fix : user 页面提示框位置修改

This commit is contained in:
likexuan
2022-06-23 16:05:24 +08:00
parent 71a4a9ecfa
commit acbd5016a9

View File

@@ -776,30 +776,14 @@ export default {
topOffSetView = topOffSet
}
if (position.top > clientHeight / 2) {
if (this.type === 'user') {
labelPosition = {
// user info 距离
left: `${position.left + position.width / 3 + leftOffSet}px`,
top: `${position.top - this.heightList - topOffSetView}px`
}
} else {
labelPosition = {
left: `${position.left + position.width + leftOffSet}px`,
top: `${position.top - this.heightList - topOffSetView}px`
}
labelPosition = {
left: `${position.left + position.width + leftOffSet}px`,
top: `${position.top - this.heightList - topOffSetView}px`
}
} else {
if (this.type === 'user') {
// user info 距离
labelPosition = {
left: `${position.left + position.width / 3 + leftOffSet}px`,
top: `${position.top + topOffSet}px`
}
} else {
labelPosition = {
left: `${position.left + position.width + leftOffSet}px`,
top: `${position.top + topOffSet}px`
}
labelPosition = {
left: `${position.left + position.width + leftOffSet}px`,
top: `${position.top + topOffSet}px`
}
}
if (position.left > clientWidth / 2) {