Zlpt_Portal_h5/src/pages/index/msgDetails.vue

41 lines
995 B
Vue

<template>
<div class="container">
<h4>{{ msgItem.noticeTitle }}</h4>
<div
style="
display: flex;
justify-content: space-between;
line-height: 1.9;
margin-bottom: 20px;
"
>
<div>发布人: {{ msgItem.createBy }}</div>
<div>发布时间: {{ msgItem.createTime }}</div>
</div>
<div v-html="msgItem.noticeContent"></div>
</div>
</template>
<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app'
import { reactive } from 'vue'
let msgItem: any = reactive({})
onLoad((opt: any) => {
console.log('🚀 ~ onLoad ~ opt:', opt)
msgItem = opt.params ? JSON.parse(opt.params) : {}
console.log('🚀 ~ onLoad ~ msgItem:', msgItem)
})
</script>
<style scoped lang="scss">
.container {
padding: 20px;
// 长文本换行
word-wrap: break-word;
word-break: break-all;
white-space: pre-wrap;
}
</style>