Files
sist_web/src/views/content/components/details.vue
2022-10-03 20:36:32 +08:00

108 lines
2.1 KiB
Vue

<template>
<div class="details" style="background-color:#fff;">
<el-row>
<el-col>
<div class="context">
<div v-if="value.title !=null && value.title != ''" class="title">{{ value.title }}</div>
<div class="details_title" v-if="value.isTop=='2'">
<!--{{value}}-->
<span>来源: {{getSource()}}</span>
<span>作者:{{value.publishUserName}}</span>
<span>日期:{{value.publishTime}}</span>
<span>点击数:{{value.viewCount}}</span>
</div>
<div class="text" v-html="value.content"></div>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
name: "details",
props: {
value: {
type: Object,
default: {
title: "12",
content: "12"
},
},
},
data() {
return {}
},
methods:{
getSource(){
if (this.value.siteType == 1){
return "信息科学与技术学院";
}else {
return "lab 实验室"
}
}
}
}
</script>
<style scoped lang="scss">
.details {
margin-top: 3rem;
width: 100%;
}
.details_title{
text-align: center;
padding-top: .8rem;
font-size: 1.2rem;
font-family: "微软雅黑";
font-weight: 400;
color: #B4B4B4;
line-height: 1.7rem;
span{
padding: 0 .8rem;
}
}
.tab {
margin-left: 1.9rem;
margin-top: 1.5rem;
font-weight: 400;
font-size: 1.4rem !important;
}
.context {
padding: 3rem 4rem;
.title {
font-size: 2.4rem;
font-weight: 500;
color: #1956BC;
text-align: center;
}
.text {
width: 100%;
margin-top: 2rem;
font-size: 1.2rem;
font-weight: 400;
color: #3C3C3C;
word-break: break-word; /* 文本行的任意字内断开 */
word-wrap: break-word; /* IE */
white-space: -moz-pre-wrap; /* Mozilla */
white-space: -hp-pre-wrap; /* HP printers */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: pre; /* CSS2 */
white-space: pre-wrap; /* CSS 2.1 */
white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
pre {
width: 100%;
}
}
}
</style>