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.
30 lines
600 B
30 lines
600 B
<template>
|
|
<ul class="news-list">
|
|
<li>编号:{{id}}</li>
|
|
<li>标题:{{title}}</li>
|
|
<li>内容:{{content}}</li>
|
|
</ul>
|
|
</template>
|
|
|
|
<script lang="ts" setup name="Detail">
|
|
// import {useRoute} from 'vue-router'
|
|
// const route = useRoute()
|
|
// const {query} = route
|
|
// // 这样上面就可以写 <li>内容:{{query.content}}</li>
|
|
// // 打印query参数
|
|
// console.log(route.query)
|
|
|
|
defineProps(['id','title','content'])
|
|
|
|
</script>
|
|
|
|
<style scoped>
|
|
.news-list{
|
|
list-style: none;
|
|
padding-left: 10px;
|
|
}
|
|
.news-list>li{
|
|
line-height: 30px;
|
|
}
|
|
|
|
</style>
|