You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.2 KiB

9 months ago
<template>
9 months ago
<div class="container">
<el-button style="margin-left: 93%" @click="backHandle" type="success">返回</el-button>
<el-divider/>
9 months ago
<p class="list-title">{{ data.title }}</p>
<p class="list-summary">{{ data.summary }}</p>
<div class="center-image">
<img class="list-image" :src="data.imageUrl" alt="News Image">
</div>
<p class="list-time">{{ data.date }}</p>
</div>
</template>
<script setup lang="ts">
9 months ago
import { ref } from 'vue'
9 months ago
import {useRoute, useRouter} from "vue-router";
const router = useRouter();
const route = useRoute();
const backHandle = ()=>{
router.go(-1);
}
9 months ago
const data = ref(route.query);
9 months ago
</script>
<style scoped>
9 months ago
.container{
width: 60%;
margin: auto;
height: 98vh;
overflow-y: scroll;
padding: 0;
display: block;
}
.container::-webkit-scrollbar {
width: 0;
}
9 months ago
.list-title{
font-size: 25px;
font-weight: 600;
9 months ago
text-align: center;
9 months ago
}
.list-summary{
font-size: 20px;
color: #8c8b8b;
margin-top: 10px;
9 months ago
line-height: 1.9;
9 months ago
}
.list-time{
font-size: 16px;
color: #999999;
margin-top: 10px;
}
.center-image{
display: flex;
justify-content: center;
margin-top: 20px;
}
.list-image{
width: 500px;
9 months ago
height: 500px;
9 months ago
margin-top: 20px;
}
</style>