From 2678e429aa7f1911528fabf5aca2d94e6d47d5ed 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: Mon, 11 Dec 2023 09:20:44 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E8=8A=82=E7=82=B9=E6=96=B9=E6=B3=95=E8=BF=94?= =?UTF-8?q?=E5=9B=9Enull=E6=97=B6=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simple-mind-map/src/core/render/node/Node.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/simple-mind-map/src/core/render/node/Node.js b/simple-mind-map/src/core/render/node/Node.js index bbbf2e57..813d517e 100644 --- a/simple-mind-map/src/core/render/node/Node.js +++ b/simple-mind-map/src/core/render/node/Node.js @@ -179,10 +179,12 @@ class Node { let { isUseCustomNodeContent, customCreateNodeContent } = this.mindMap.opt if (isUseCustomNodeContent && customCreateNodeContent) { this._customNodeContent = customCreateNodeContent(this) - this._customNodeContent.setAttribute('xmlns', 'http://www.w3.org/1999/xhtml') } // 如果没有返回内容,那么还是使用内置的节点内容 - if (this._customNodeContent) return + if (this._customNodeContent) { + this._customNodeContent.setAttribute('xmlns', 'http://www.w3.org/1999/xhtml') + return + } this._imgData = this.createImgNode() this._iconData = this.createIconNode() this._textData = this.createTextNode()