info.vue
1.79 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<template>
<div class="app-container">
<el-row>
<el-col :offset="3" :span="18">
<h1 class="info_title">{{ info.title }}</h1>
</el-col>
</el-row>
<el-row>
<el-col :offset="3" :span="18">
<div class="info_author">
<span>作者:</span><span>{{ info.createBy }}</span>
<span>发表时间:</span><span>{{ info.createTime }}</span>
</div>
</el-col>
</el-row>
<el-row>
<el-col :offset="3" :span="18">
<div class="info_content ql-editor" v-html="info.content"></div>
</el-col>
</el-row>
</div>
</template>
<script>
import {
addDocumentData,
delDocumentData,
exportDocumentData,
getDocumentData,
listDocumentData,
updateDocumentData
} from "@/api/other/documentData";
import Editor from '@/components/2cEditor';
import "quill/dist/quill.core.css";
import {parseTime} from "../../../utils/trash";
export default {
name: "DocumentData",
components: {Editor},
data() {
return {
// 遮罩层
loading: true,
info: {
title:null,
createBy:null,
createTime:null,
content:null
},
};
},
created() {
this.initData();
},
watch:{
'$route.query.documentData':'initData'
},
methods: {
initData(){
if(this.$route.query.documentData){
this.info = this.$route.query.documentData;
}
}
}
};
</script>
<style lang="scss" scoped>
.info_title{
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
.info_author{
display: flex;
justify-content: center;
align-items: center;
height: 26px;
font-size:14px;
color: #616977;
border-bottom: 1px solid #ddd;
box-shadow: 0px 20px 20px -20px #5E5E5E;
}
.info_author span:nth-child(2){
margin-right: 20px;
}
</style>