|
@@ -18,8 +18,7 @@
|
|
@mouseenter="iptMouseenter"/>
|
|
@mouseenter="iptMouseenter"/>
|
|
|
|
|
|
<template v-if="currentIptIndex == index && userList.length">
|
|
<template v-if="currentIptIndex == index && userList.length">
|
|
- <div class="user-list-wrapper"
|
|
|
|
- :style="{ left: domStyle.left + 'px', top: domStyle.top + 'px' }">
|
|
|
|
|
|
+ <div class="user-list-wrapper">
|
|
<div class="item"
|
|
<div class="item"
|
|
v-for="(item, index) in userList"
|
|
v-for="(item, index) in userList"
|
|
:key="index"
|
|
:key="index"
|
|
@@ -210,9 +209,10 @@ const iptMouseenter = (e) => {
|
|
const rectClick = (event) => {
|
|
const rectClick = (event) => {
|
|
//获取相对于当前所指向对象的位置坐标
|
|
//获取相对于当前所指向对象的位置坐标
|
|
console.log(event,'x:' + event.clientX + " y:" + event.clientY);
|
|
console.log(event,'x:' + event.clientX + " y:" + event.clientY);
|
|
|
|
+ let dom = event.target;
|
|
domStyle.value = {
|
|
domStyle.value = {
|
|
- left : event.clientX / 2,
|
|
|
|
- top: event.clientY
|
|
|
|
|
|
+ left : (dom.getBoundingClientRect().left / 2) - 140,
|
|
|
|
+ top: dom.getBoundingClientRect().top + 20
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -302,7 +302,7 @@ const onUserMouseLeave = (params, index) => {
|
|
.user-list-wrapper {
|
|
.user-list-wrapper {
|
|
width: 284px;
|
|
width: 284px;
|
|
max-height: 430px;
|
|
max-height: 430px;
|
|
- position: fixed;
|
|
|
|
|
|
+ position: absolute;
|
|
box-shadow: 0px 4px 20px 0px #0000004D;
|
|
box-shadow: 0px 4px 20px 0px #0000004D;
|
|
overflow-y: scroll;
|
|
overflow-y: scroll;
|
|
background-color: #fff;
|
|
background-color: #fff;
|