notice.vue
740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<template>
<el-empty v-if="state.noticeList && state.noticeList.length == 0" description="暂无消息"/>
<div v-else v-for="item in state.noticeList" class="notice_wrap">
<div class="con">{{ item.message }}</div>
<div class="time">{{ item.createTime }}</div>
</div>
</template>
<script setup lang="ts">
import * as api from "./../../interface/api"
let state = reactive({
noticeList: []
})
api.getNotice().then(res => {
state.noticeList = res.rows
})
const arrowPath = ref("/")
defineExpose({arrowPath})
</script>
<style scoped>
.notice_wrap {
background-color: #FFFFFF;
margin: 10px 20px;
padding: 20px;
.con {
text-indent: 2em;
font-size: 16px;
}
.time {
text-align: right;
}
}
</style>