|
@@ -9,18 +9,16 @@ import MyToolTip from './ToolTip.vue'
|
|
|
// 位置定位
|
|
|
function calculationLocation(el, target, placements) {
|
|
|
if (!el || !target) return;
|
|
|
- // console.log('el:', el)
|
|
|
- // console.log('target:', target)
|
|
|
|
|
|
el.tooltipPosition.y = 0;
|
|
|
el.tooltipPosition.x = 0;
|
|
|
// let el_dom = el.$el?.nextElementSibling?.getBoundingClientRect() || target?.w_tipInstance?.$el?.nextElementSibling?.getBoundingClientRect() || null
|
|
|
|
|
|
- const parent_dom = el?.$el ? el.$el?.nextElementSibling?.getBoundingClientRect() : el._.vnode.el
|
|
|
+ const parent_dom = el?.$el ? el.$el?.nextElementSibling?.getBoundingClientRect() : el._.vnode.el.getBoundingClientRect()
|
|
|
let el_dom = parent_dom || target?.w_tipInstance?.$el?.nextElementSibling?.getBoundingClientRect() || null
|
|
|
|
|
|
let target_dom = target.getBoundingClientRect()
|
|
|
- console.log(parent_dom, el_dom, el, target, placements, '位置定位')
|
|
|
+ console.log(parent_dom, el_dom, el, el._, el._.vnode, target, placements, '位置定位')
|
|
|
if(!el_dom) {
|
|
|
// console.log('el_dom:不存在', el_dom)
|
|
|
return
|