不規(guī)則的表格
如果內(nèi)容過長呢口注?
<div class="specialText">
{{item.name}}:
<!--如果內(nèi)容長度大于15置逻,后面的就省略,只顯示前16個(gè)-->
<span v-if="item.content.length > 15" style="color: #0E0E0E;line-height: 17px;">
{{item.content.substring(0, 15)+"... "}}<el-button type="text" @click="openDetail(item.content, item.name)">查看詳情</el-button>
</span>
<span v-else style="color: #0E0E0E;line-height: 17px;">{{item.content}}掌呜;</span>
</div>
// 查看這條內(nèi)容的詳情
openDetail(content, title) {
this.$alert(content, title, {
confirmButtonText: '確定',
});
},
結(jié)果為:
只顯示一部分
點(diǎn)擊查看詳情顯示彈窗