render: (h, params) => {
return h("div", [
h("Tooltip", {}, [
h(
"div",
{
style: {
display: "inline-block",
width: "100%",
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
},
},
this.typeList[params.row.type - 1].conName
), // 表格显示文字
h(
"div",
{
slot: "content",
style: {
whiteSpace: "normal",
wordBreak: "break-all",
},
},
this.typeList[params.row.type - 1].conName // 气泡内的文字
),
]),
]);
},
},
如果在表格中悬浮被遮挡
render: (h, params) => {
return h(
"div",
[
h(
"Tooltip",
{
//加这行代码
props: {
transfer: true,
},
//加这行代码
},
[
h(
"div",
{
style: {
display: "inline-block",
width: "100%",
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
},
},
params.row.typespec
), // 表格显示文字
h(
"div",
{
slot: "content",
style: {
whiteSpace: "normal",
wordBreak: "break-all",
},
},
params.row.typespec // 气泡内的文字
),
]
),
]
);
},