From 84d2a374d11886c49c738c561dd8e749b79034ac Mon Sep 17 00:00:00 2001 From: wanglin2 <1013335014@qq.com> Date: Fri, 13 Oct 2023 16:09:35 +0800 Subject: [PATCH] =?UTF-8?q?Demo=EF=BC=9A=E7=BB=99=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E7=9A=84getData=E6=96=B9=E6=B3=95=E7=9A=84=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=80=BC=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/pages/Edit/components/NodeHyperlink.vue | 4 ++-- web/src/pages/Edit/components/NodeIconSidebar.vue | 2 +- web/src/pages/Edit/components/NodeImage.vue | 4 ++-- web/src/pages/Edit/components/NodeNote.vue | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/web/src/pages/Edit/components/NodeHyperlink.vue b/web/src/pages/Edit/components/NodeHyperlink.vue index 3bb951fa..1207b967 100644 --- a/web/src/pages/Edit/components/NodeHyperlink.vue +++ b/web/src/pages/Edit/components/NodeHyperlink.vue @@ -70,9 +70,9 @@ export default { this.activeNodes = [...args[1]] if (this.activeNodes.length > 0) { let firstNode = this.activeNodes[0] - this.link = firstNode.getData('hyperlink') + this.link = firstNode.getData('hyperlink') || '' this.handleUrl(true) - this.linkTitle = firstNode.getData('hyperlinkTitle') + this.linkTitle = firstNode.getData('hyperlinkTitle') || '' } else { this.link = '' this.linkTitle = '' diff --git a/web/src/pages/Edit/components/NodeIconSidebar.vue b/web/src/pages/Edit/components/NodeIconSidebar.vue index 54b5c36f..acb88ebb 100644 --- a/web/src/pages/Edit/components/NodeIconSidebar.vue +++ b/web/src/pages/Edit/components/NodeIconSidebar.vue @@ -102,7 +102,7 @@ export default { this.activeNodes = [...args[1]] if (this.activeNodes.length > 0) { let firstNode = this.activeNodes[0] - this.nodeImage = firstNode.getData('image') + this.nodeImage = firstNode.getData('image') || '' this.iconList = firstNode.getData('icon') || [] // 回显图标 } else { this.iconList = [] diff --git a/web/src/pages/Edit/components/NodeImage.vue b/web/src/pages/Edit/components/NodeImage.vue index 9bd2b8c2..494b53d2 100644 --- a/web/src/pages/Edit/components/NodeImage.vue +++ b/web/src/pages/Edit/components/NodeImage.vue @@ -75,7 +75,7 @@ export default { this.reset() if (this.activeNodes.length > 0) { let firstNode = this.activeNodes[0] - let img = firstNode.getData('image') + let img = firstNode.getData('image') || '' if (img) { if (/^https?:\/\//.test(img)) { this.imgUrl = img @@ -83,7 +83,7 @@ export default { this.img = img } } - this.imgTitle = firstNode.getData('imageTitle') + this.imgTitle = firstNode.getData('imageTitle') || '' } this.dialogVisible = true }, diff --git a/web/src/pages/Edit/components/NodeNote.vue b/web/src/pages/Edit/components/NodeNote.vue index 31e98af2..a58549ac 100644 --- a/web/src/pages/Edit/components/NodeNote.vue +++ b/web/src/pages/Edit/components/NodeNote.vue @@ -55,7 +55,7 @@ export default { this.activeNodes = [...args[1]] if (this.activeNodes.length > 0) { let firstNode = this.activeNodes[0] - this.note = firstNode.getData('note') + this.note = firstNode.getData('note') || '' } else { this.note = '' }