From a7db997ea7a2e69a3b93e9099903ee7f4b9bd691 Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Mon, 23 Jun 2025 14:05:36 +0800 Subject: [PATCH] ui: remove unused method in `ContextMenu.vue` Signed-off-by: Jianhui Zhao --- ui/src/components/ContextMenu.vue | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/ui/src/components/ContextMenu.vue b/ui/src/components/ContextMenu.vue index cbf9c77..a1ff5e6 100644 --- a/ui/src/components/ContextMenu.vue +++ b/ui/src/components/ContextMenu.vue @@ -36,21 +36,6 @@ export default { this.visibility = false }, - updated() { - if (this.$refs.content) { - const bw = document.body.offsetWidth - const bh = document.body.offsetHeight - const element = this.$refs.content - const width = element.offsetWidth - const height = element.offsetHeight - - if (this.axis.x + width >= bw) - this.axis.x = bw - width - - if (this.axis.y + height >= bh) - this.axis.y = bh - height - } - }, show(e) { document.addEventListener('mousedown', this.close) this.axis = {x: e.clientX, y: e.clientY}