组织树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" fill="#0058e1"
></path> ></path>
</svg> </svg>
<a-tooltip> <a-tooltip @mouseenter="showToolTip">
<template #title>{{ val.title }}</template> <template #title>{{ val.title }}</template>
<span class="name"> <span class="name">
{{ val.title }} {{ val.title }}
@ -88,7 +88,7 @@
fill="#0058e1" fill="#0058e1"
></path> ></path>
</svg> </svg>
<a-tooltip> <a-tooltip @mouseenter="showToolTip">
<template #title>{{ child.title }}</template> <template #title>{{ child.title }}</template>
<span class="name"> <span class="name">
{{ child.title }} {{ child.title }}
@ -222,7 +222,6 @@
}) })
// children // children
const generateChildren = (val, obj) => { const generateChildren = (val, obj) => {
if (val.dataList.length > 0) { if (val.dataList.length > 0) {
val.dataList.forEach((child) => { val.dataList.forEach((child) => {
let children = { 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) => { const generateChildren2 = (val, obj) => {
if (val.dataList.length > 0) { if (val.dataList.length > 0) {
val.dataList.forEach((dis) => { val.dataList.forEach((dis) => {
let children = { let children = {
@ -382,6 +387,7 @@
showBottom, showBottom,
showDown, showDown,
selectId, selectId,
showToolTip,
} }
}, },
beforeUnmount() { beforeUnmount() {
@ -498,6 +504,7 @@
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
word-break: break-all; word-break: break-all;
max-width: 200px;
} }
} }
.up:hover { .up:hover {