perf: 优化消息长按菜单

This commit is contained in:
kuaifan 2025-03-29 14:11:47 +08:00
parent ad70f23a05
commit df4e00e23f

View File

@ -3164,7 +3164,14 @@ export default {
if (rect.bottom > scrollerRect.bottom) {
height -= rect.bottom - scrollerRect.bottom
}
const left = this.windowWidth < 500 && this.operateItem.created_at ? (this.windowWidth / 2) : this.operateItem.clientX
let left = this.operateItem.clientX
if (this.windowWidth < 500) {
if (this.operateItem.created_at) {
left = this.windowWidth / 2
} else {
left = rect.left + (rect.width / 2)
}
}
this.operateStyles = {
left: `${left}px`,
top: `${top}px`,