|
@@ -29,7 +29,7 @@
|
|
{{ item.title || '暂无标题' }}
|
|
{{ item.title || '暂无标题' }}
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="right_2 textMore">
|
|
<el-col :span="24" class="right_2 textMore">
|
|
- <div v-html="item.content"></div>
|
|
|
|
|
|
+ <div v-html="removeHtmlStyle(item.content)"></div>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="right_3">
|
|
<el-col :span="24" class="right_3">
|
|
{{ item.time || '暂无' }}
|
|
{{ item.time || '暂无' }}
|
|
@@ -146,7 +146,18 @@ const toView = (item) => {
|
|
const toMore = () => {
|
|
const toMore = () => {
|
|
router.push({ path: `/achievement` })
|
|
router.push({ path: `/achievement` })
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+const removeHtmlStyle = (html) => {
|
|
|
|
+ let relStyle = /style\s*?=\s*?([‘"])[\s\S]*?\1/g //去除样式
|
|
|
|
+ let relTag = /<.+?>/g //去除标签
|
|
|
|
+ let relClass = /class\s*?=\s*?([‘"])[\s\S]*?\1/g // 清除类名
|
|
|
|
+ let newHtml = ''
|
|
|
|
+ if (html) {
|
|
|
|
+ newHtml = html.replace(relStyle, '')
|
|
|
|
+ newHtml = newHtml.replace(relTag, '')
|
|
|
|
+ newHtml = newHtml.replace(relClass, '')
|
|
|
|
+ }
|
|
|
|
+ return newHtml
|
|
|
|
+}
|
|
const currentPage = ref(1)
|
|
const currentPage = ref(1)
|
|
// 分页
|
|
// 分页
|
|
const changePage = (page = currentPage.value) => {
|
|
const changePage = (page = currentPage.value) => {
|
|
@@ -217,6 +228,7 @@ const sizeChange = (limits) => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.right {
|
|
.right {
|
|
|
|
+ margin: 0 0 0 10px;
|
|
.right_1 {
|
|
.right_1 {
|
|
height: 24px;
|
|
height: 24px;
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
@@ -230,9 +242,16 @@ const sizeChange = (limits) => {
|
|
margin-bottom: 20px;
|
|
margin-bottom: 20px;
|
|
}
|
|
}
|
|
.right_2 {
|
|
.right_2 {
|
|
- height: 48px;
|
|
|
|
margin-bottom: 20px;
|
|
margin-bottom: 20px;
|
|
|
|
+ height: 48px;
|
|
|
|
+ overflow: hidden;
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
|
+ font-family:
|
|
|
|
+ PingFangSC-Regular,
|
|
|
|
+ PingFang SC;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ color: #999;
|
|
|
|
+ line-height: 24px;
|
|
}
|
|
}
|
|
.right_3 {
|
|
.right_3 {
|
|
font-size: 12px;
|
|
font-size: 12px;
|