<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>
        <p>{{ msgItem.noticeContent }}</p>
    </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 = 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>
