perf : 弹框位置调整

This commit is contained in:
likexuan
2022-07-05 16:32:57 +08:00
parent 76ceabe639
commit 581dff59c2
2 changed files with 8 additions and 4 deletions

View File

@@ -778,12 +778,14 @@ export default {
if (position.top > clientHeight / 2) {
labelPosition = {
left: `${position.left + position.width + leftOffSet}px`,
top: `${position.top - this.heightList - topOffSetView}px`
// top: `${position.top - this.heightList - topOffSetView}px`
top: `${position.top - this.heightList - topOffSetView + position.height / 2}px`
}
} else {
labelPosition = {
left: `${position.left + position.width + leftOffSet}px`,
top: `${position.top + topOffSet}px`
// top: `${position.top + topOffSet}px`
top: `${position.top + position.height / 2}px`
}
}
if (position.left > clientWidth / 2) {