mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-14 12:42:51 +00:00
perf: 优化消息长按菜单
This commit is contained in:
parent
ad70f23a05
commit
df4e00e23f
@ -3164,7 +3164,14 @@ export default {
|
|||||||
if (rect.bottom > scrollerRect.bottom) {
|
if (rect.bottom > scrollerRect.bottom) {
|
||||||
height -= 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 = {
|
this.operateStyles = {
|
||||||
left: `${left}px`,
|
left: `${left}px`,
|
||||||
top: `${top}px`,
|
top: `${top}px`,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user