mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-06 05:05:35 +00:00
perf: 优化长按消息菜单显示逻辑
This commit is contained in:
parent
36f313380e
commit
b1776c82ad
@ -275,6 +275,7 @@
|
|||||||
<!--长按、右键-->
|
<!--长按、右键-->
|
||||||
<div class="operate-position" :style="operateStyles" v-show="operateVisible">
|
<div class="operate-position" :style="operateStyles" v-show="operateVisible">
|
||||||
<Dropdown
|
<Dropdown
|
||||||
|
ref="operate"
|
||||||
trigger="custom"
|
trigger="custom"
|
||||||
placement="top"
|
placement="top"
|
||||||
:visible="operateVisible"
|
:visible="operateVisible"
|
||||||
@ -1432,9 +1433,10 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
operateVisible(val) {
|
operateVisible(val) {
|
||||||
if (!val && !this.pointerMouse) {
|
if (val || this.pointerMouse || this.focusLazy) {
|
||||||
document.getSelection().removeAllRanges();
|
return
|
||||||
}
|
}
|
||||||
|
document.getSelection().removeAllRanges();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -2812,7 +2814,13 @@ export default {
|
|||||||
height: `${height}px`,
|
height: `${height}px`,
|
||||||
}
|
}
|
||||||
this.operateClient = {x: left, y: event.clientY};
|
this.operateClient = {x: left, y: event.clientY};
|
||||||
this.operateVisible = true;
|
if (this.operateVisible) {
|
||||||
|
try {
|
||||||
|
this.$refs.operate.$refs.drop.popper.update()
|
||||||
|
} catch (e) {}
|
||||||
|
} else {
|
||||||
|
this.operateVisible = true;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -3780,7 +3788,6 @@ export default {
|
|||||||
$A.messageError(msg);
|
$A.messageError(msg);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user