From 12c6479c0d3691570e9fd98a7accd386fa40bcda 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: Tue, 9 Jul 2024 15:54:06 +0800 Subject: [PATCH] =?UTF-8?q?Feat=EF=BC=9Anode=5Ftag=5Fclick=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E6=96=B0=E5=A2=9E=E4=B8=A4=E4=B8=AA=E5=9B=9E=E8=B0=83?= =?UTF-8?q?=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simple-mind-map/src/core/render/node/nodeCreateContents.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simple-mind-map/src/core/render/node/nodeCreateContents.js b/simple-mind-map/src/core/render/node/nodeCreateContents.js index 04fea5ef..7592086a 100644 --- a/simple-mind-map/src/core/render/node/nodeCreateContents.js +++ b/simple-mind-map/src/core/render/node/nodeCreateContents.js @@ -302,7 +302,7 @@ function createTagNode() { let { maxTag, tagsColorMap } = this.mindMap.opt tagsColorMap = tagsColorMap || {} const nodes = [] - tagData.slice(0, maxTag).forEach(item => { + tagData.slice(0, maxTag).forEach((item, index) => { let str = '' let style = { ...defaultTagStyle @@ -320,7 +320,7 @@ function createTagNode() { // 创建容器节点 const tag = new G() tag.on('click', () => { - this.mindMap.emit('node_tag_click', this, item) + this.mindMap.emit('node_tag_click', this, item, index, tag) }) // 标签文本 const text = new Text().text(str)