组织树tootip问题修复

This commit is contained in:
wuhongjian 2022-12-08 11:48:10 +08:00
parent 7a096d5dc1
commit 2b00dd9130
1 changed files with 45 additions and 38 deletions

View File

@ -39,7 +39,7 @@
fill="#0058e1"
></path>
</svg>
<a-tooltip>
<a-tooltip @mouseenter="showToolTip">
<template #title>{{ val.title }}</template>
<span class="name">
{{ val.title }}
@ -88,7 +88,7 @@
fill="#0058e1"
></path>
</svg>
<a-tooltip>
<a-tooltip @mouseenter="showToolTip">
<template #title>{{ child.title }}</template>
<span class="name">
{{ child.title }}
@ -222,7 +222,6 @@
})
// children
const generateChildren = (val, obj) => {
if (val.dataList.length > 0) {
val.dataList.forEach((child) => {
let children = {
@ -237,9 +236,15 @@
})
}
}
const showToolTip = (e) => {
console.log('鼠标移入', e, e.target.clientWidth, e.target.scrollWidth)
debugger
if (e.target.clientWidth < 200) {
e.target.style.pointerEvents = 'none' //
}
}
//
const generateChildren2 = (val, obj) => {
if (val.dataList.length > 0) {
val.dataList.forEach((dis) => {
let children = {
@ -382,6 +387,7 @@
showBottom,
showDown,
selectId,
showToolTip,
}
},
beforeUnmount() {
@ -498,6 +504,7 @@
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
max-width: 200px;
}
}
.up:hover {