1.将html转换成纯文本:
html.replace(/<(style|script|iframe)[>]*?>[\s\S]+?</\1\s*>/gi,’’).replace(/<[>]+?>/g,’’).replace(/\s+/g,’
2.domProps:展示文本加入…
{
title: “问题内容”,
key: “content”,
//tooltip: true
render: (h, params) => {
return h(“div”, [
h(“html”, {
style: {
display: “inline-block”,
width: “100%”,
overflow: “hidden”,
textOverflow: “ellipsis”,
whiteSpace: “nowrap”
},
domProps: {
//innerHTML: params.row.content,
title: params.row.content
}
},params.row.content)
]);
}
},
暂时没有解决悬浮html展示,有方法的请指教一下;
vue iview table 关于html展示问题
最新推荐文章于 2023-02-01 16:43:36 发布