效果图

html
<el-table-column
prop="desc"
label=""
width="780">
<template slot-scope="scope">
<tr v-html="scope.row.desc.join('')"></tr>
<!-- <span style="margin-left: 10px">{{ scope.row.desc}}</span> -->
</template>
</el-table-column>
getDetailRules(this.hash).then(res=>{
var arr = []
for(var key in res){
var o = {}
o.prop = key
var arr2 = res[key]
var arr1 = arr2.map(function(item){
return item + '</br>'
})
o.desc = arr1
arr.push(o)
}
this.content = arr
console.log(this.content)
})
Element-UI表格内容换行解决方案

本文介绍了如何在使用Element-UI库构建的表格组件中实现内容换行,通过示例代码和实际效果展示了解决方法。
4676

被折叠的 条评论
为什么被折叠?



