iview render中超长文字隐藏加提示并加上按钮事件
实现效果:
代码:
render: (h, params) => {
return h("div",
[
h(
"Tooltip",
{
props: {
placement: "top-start",
"max-width":"400",
transfer: true,
content: params.row.remark, //改成自己想要显示的
},
},
[
h(
"span",
{
style: {
display: "inline-block",
width: "600px",
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
},
},
params.row.remark
),
]
),
h(
"a",
{
style: {
float: "right",
},
on: {
click: () => {
this.getmark(params.row.remark);
},
},
},
"详情"
),
]);
},