mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-11 11:56:46 +08:00
修改鼠标悬停提示处理
This commit is contained in:
@@ -77,14 +77,14 @@
|
|||||||
<template #bodyCell="{ record, column }">
|
<template #bodyCell="{ record, column }">
|
||||||
|
|
||||||
<template v-if="column.key === 'orgName'">
|
<template v-if="column.key === 'orgName'">
|
||||||
<a-space style="display:flex ;justify-content: left;" @mouseenter="showTooltip(record.orgName)" @mouseleave="hideTooltip">
|
<a-space style="display:flex ;justify-content: left;">
|
||||||
<!-- <a-popover>
|
<!-- <a-popover>
|
||||||
<template #content>
|
<template #content>
|
||||||
<p>{{ record.orgName}}</p>
|
<p>{{ record.orgName}}</p>
|
||||||
</template> -->
|
</template> -->
|
||||||
<div
|
<div
|
||||||
style="max-width: 180px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;user-select:text"
|
style="max-width: 180px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;user-select:text"
|
||||||
>{{ record.neworganizationName }}</div>
|
:title="record.orgName">{{ record.neworganizationName }}</div>
|
||||||
<!-- </a-popover> -->
|
<!-- </a-popover> -->
|
||||||
</a-space>
|
</a-space>
|
||||||
</template>
|
</template>
|
||||||
@@ -453,8 +453,9 @@ export default {
|
|||||||
const activeTooltip = ref(null); // 当前显示的提示框对应的记录 ID
|
const activeTooltip = ref(null); // 当前显示的提示框对应的记录 ID
|
||||||
|
|
||||||
// 显示提示框
|
// 显示提示框
|
||||||
const showTooltip = (orgName) => {
|
const showTooltip = (title) => {
|
||||||
activeTooltip.value = orgName;
|
console.log("================title",title);
|
||||||
|
activeTooltip.value = title;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 隐藏提示框
|
// 隐藏提示框
|
||||||
@@ -792,7 +793,14 @@ export default {
|
|||||||
{ value.record.name } / { value.record.userNo }
|
{ value.record.name } / { value.record.userNo }
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
},
|
||||||
|
customCell: (record) => {
|
||||||
|
return {
|
||||||
|
style: { userSelect: 'text' },
|
||||||
|
onMouseenter: () => showTooltip(record.name), // 绑定自定义的 showTooltip 方法
|
||||||
|
onMouseleave: hideTooltip, // 绑定自定义的 hideTooltip 方法
|
||||||
|
};
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '所属组织 ',
|
title: '所属组织 ',
|
||||||
|
|||||||
Reference in New Issue
Block a user