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
40
41
42
43
44
45
46
47
48
49
50
<template>
<div class="app-content" style="height:75vh;overflow:auto;">
<a-spin :spinning="loading" style="width:100%;height:100%;">
<div v-html="formData.content"></div>
</a-spin>
</div>
</template>
<script>
export default {
name: "msg",
components: {},
props: {
value: {
type: String,
default: () => {
return null;
},
},
},
data () {
return {
formData: { title: null, content: null },
loading: false,
}
},
created () {
this.getById()
},
computed: {
},
methods: {
getById () {
if (!!this.value) {
this.loading = true
this.$api.notice.getById({ id: this.value }).then(({ data = {} }) => {
if (data) {
this.formData = data
}
this.loading = false
}).catch(() => {
this.loading = false
})
}
},
},
};
</script>
<style scoped lang="less">
</style>