From 94ed53b31f25ff7b7c02af0434f77b085404ffd2 Mon Sep 17 00:00:00 2001 From: wanglin2 <1013335014@qq.com> Date: Sun, 30 Mar 2025 16:04:08 +0800 Subject: [PATCH] =?UTF-8?q?Demo:=E4=BF=AE=E5=A4=8D=E7=94=BB=E5=B8=83?= =?UTF-8?q?=E8=BE=B9=E7=BC=98=E8=8A=82=E7=82=B9=E5=A4=87=E6=B3=A8=E6=B5=AE?= =?UTF-8?q?=E5=B1=82=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=AE=8C=E5=85=A8=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/pages/Edit/components/NodeNoteContentShow.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/src/pages/Edit/components/NodeNoteContentShow.vue b/web/src/pages/Edit/components/NodeNoteContentShow.vue index ea9cbd0d..da0d467b 100644 --- a/web/src/pages/Edit/components/NodeNoteContentShow.vue +++ b/web/src/pages/Edit/components/NodeNoteContentShow.vue @@ -95,8 +95,10 @@ export default { // 更新位置 updateNoteContentPosition(left, top) { - this.left = left - this.top = top + const { width, height } = this.$refs.noteContentViewer.getBoundingClientRect() + const { right, bottom } = this.mindMap.elRect + this.left = left + width > right ? right - width : left + this.top = top + height > bottom ? bottom - height : top }, // 画布缩放事件 @@ -131,6 +133,7 @@ export default { border-radius: 5px; box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.06); border: 1px solid rgba(0, 0, 0, 0.06); + z-index: 2; .noteContentWrap { max-width: 250px;