{
title: "操作",
key: "action",
width: 200,
align: "center",
render: (h, params) => {
if (
!params.row.needPerm ||
(this.$route.meta.permTypes &&
this.$route.meta.permTypes.includes("view"))
) {
return h("div", [
h(
"Button",
{
props: {
type: "primary",
size: "small",
icon: "md-eye"
},
style: {
marginRight: "5px"
},
on: {
click: () => {
this.showData(params.row);
}
}
},
"查看数据"
)
]);
} else {
return h("div", [
h(
"Button",
{
props: {
size: "small",
icon: "ios-close-circle-outline"
},
style: {
marginRight: "5px"
},
on: {
click: () => {}
}
},
"您无权查看"
)
]);
}
}
}
vue之render用法
最新推荐文章于 2022-06-23 22:45:00 发布