添加样式即可`style="white-space:pre;"` <el-table-columnprop="xxx"label="abc"align="center"min-width="150"show-overflow-tooltip><templateslot-scope="scope"><spanv-html="scope.row.xxx"style="white-space:pre;"></span></template></el-table-column>...
<el-table-columnprop="remark"label="备注"min-width="200"><templateslot-scope="scope"><template><spanclass="pre">{{ scope.row.remark }}</span></template></template></el-table-column> <style lang="scss" scoped> .pre{white-space:pre-wrap;word-wrap:break-word; }</style> 添加样式即...
在使用ElementUI开发时,可能需要实现el-table的选中和el-tag同步。 类似如下效果: 希望表格选择改变,或者tag删除时,table和tag能同步选择情况。 查了一下官方文档,找到了一种解决方案如下。 首先el-table需要务必设置row-key,这个row-key作用: row-key行数据的 Key,用来优化 Table 的渲染;在使用 reserve-selection...