From edddbbd1d6de4e8b36127c9ad2194e443ba83839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A1=97=E8=A7=92=E5=B0=8F=E6=9E=97?= <1013335014@qq.com> Date: Fri, 26 Jan 2024 09:05:34 +0800 Subject: [PATCH] =?UTF-8?q?Demo=EF=BC=9A=E4=BF=AE=E5=A4=8D=E5=A4=A7?= =?UTF-8?q?=E7=BA=B2=E4=B8=AD=E6=96=87=E6=9C=AC=E6=8D=A2=E8=A1=8C=E4=B8=8D?= =?UTF-8?q?=E7=94=9F=E6=95=88=EF=BC=8C=E6=98=BE=E7=A4=BAbr=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E7=9A=84=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/Outline.vue | 4 ++-- web/src/pages/Edit/components/OutlineEdit.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/pages/Edit/components/Outline.vue b/web/src/pages/Edit/components/Outline.vue index ef32ed35..a28b736c 100644 --- a/web/src/pages/Edit/components/Outline.vue +++ b/web/src/pages/Edit/components/Outline.vue @@ -131,11 +131,11 @@ export default { let data = this.mindMap.getData() data.root = true // 标记根节点 let walk = root => { - let text = (root.data.richText + let text = root.data.richText ? nodeRichTextToTextWithWrap(root.data.text) : root.data.text - ).replaceAll(/\n/g, '
') text = htmlEscape(text) + text = text.replaceAll(/\n/g, '
') root.textCache = text // 保存一份修改前的数据,用于对比是否修改了 root.label = text root.uid = root.data.uid diff --git a/web/src/pages/Edit/components/OutlineEdit.vue b/web/src/pages/Edit/components/OutlineEdit.vue index a2a752fe..6e53c92e 100644 --- a/web/src/pages/Edit/components/OutlineEdit.vue +++ b/web/src/pages/Edit/components/OutlineEdit.vue @@ -103,11 +103,11 @@ export default { let data = this.mindMap.getData() data.root = true // 标记根节点 let walk = root => { - let text = (root.data.richText + let text = root.data.richText ? nodeRichTextToTextWithWrap(root.data.text) : root.data.text - ).replaceAll(/\n/g, '
') text = htmlEscape(text) + text = text.replaceAll(/\n/g, '
') root.textCache = text // 保存一份修改前的数据,用于对比是否修改了 root.label = text root.uid = root.data.uid