mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
Merge branch 'stat' of https://codeup.aliyun.com/6265f483e4166464dc2f9c14/boeu/portal into stat
This commit is contained in:
@@ -1008,7 +1008,6 @@
|
||||
margin-right: 30px;
|
||||
margin-bottom: 30px;
|
||||
border-radius: 8px;
|
||||
background-color: #000000;
|
||||
|
||||
.xindex-course-image{
|
||||
width: 340px;
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
<!--在这一层上加事件-->
|
||||
<div class="answer-text">
|
||||
<span style="color: #303133" v-html="displayAll(item)"></span>
|
||||
<span v-if="item.content.length > 170" @click="changeIsAll(item)">{{ item.isAll ? '收起' : '全文'
|
||||
<span v-if="item.content.length > 170 || item.content.split('\n').length>5" @click="changeIsAll(item)">{{ item.isAll ? '收起' : '全文'
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="answer-time">
|
||||
@@ -751,12 +751,16 @@ export default {
|
||||
hideButtons() {
|
||||
this.btnsShowRowId = '';
|
||||
},
|
||||
|
||||
//展示全部
|
||||
displayAll(item) {
|
||||
let content = '';
|
||||
content = item.content.replace(/(\n){2,}/,'<br>');
|
||||
item.content = content;
|
||||
if (!item.isAll && item.content.length > 170) {
|
||||
if (!item.isAll && item.content.length > 170 || !item.isAll && item.content.split("\n").length>5) {
|
||||
if(!item.isAll && item.content.split("\n").length>5){
|
||||
return item.content.slice(0, 10) + "...";
|
||||
}
|
||||
return item.content.slice(0, 170) + "...";
|
||||
}
|
||||
return item.content;
|
||||
@@ -1023,7 +1027,7 @@ export default {
|
||||
span {
|
||||
color: #409eff;
|
||||
cursor: pointer;
|
||||
margin-left: 5px;
|
||||
// margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user