使用的时候注意:这里使用的键名称是 “type” ,记得换成自己的
{
title: "类型",
key: "type",
ellipsis: true, //内容多用省略号代替
tooltip:true, //内容多显示提示框
align: "center",
minWidth: 120,
renderHeader: (h) => {
return h(
"div",
{
style: {
display: "inline-block"
},
on: {
click: () => {
// 自定义列头的点击事件
this.$Modal.info({
title: "异常说明",
content: `
<p>表示后台接口异常</p>`
});
}
}
},
[
h("strong", "类型"),
h("Icon", {
props: {
type: "md-alert"
},
style: {
fontSize: "16px",
lineHeight: "20px"
}
})
]
);
},
render: (h, params) => {
return h("div", [params.row.type == "0" ? "正常" : "异常"]);
}
},