From b69b5f6329ca5f87932436b7a6c1ddfc3377e10f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 16 五月 2024 10:56:41 +0800
Subject: [PATCH] 2024-05-16

---
 src/tabviews/custom/components/chart/antv-X6/index.jsx |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/tabviews/custom/components/chart/antv-X6/index.jsx b/src/tabviews/custom/components/chart/antv-X6/index.jsx
index 83d89e4..ad2f38a 100644
--- a/src/tabviews/custom/components/chart/antv-X6/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-X6/index.jsx
@@ -1894,6 +1894,16 @@
     }
   }
 
+  delCell = () => {
+    const { node } = this.state
+
+    let cell = this.mkGraph.getCellById(node.id)
+
+    this.mkGraph.removeCells([cell])
+
+    this.setState({node: null})
+  }
+
   changeProps = (value, key) => {
     const { node } = this.state
 
@@ -2345,7 +2355,7 @@
           <div id={config.uuid + 'container'} className="mk-container"></div>
           <div className="mk-node-edit">
             <div className="header">璁剧疆</div>
-            {!node ? <div className="empty">鏈�変腑</div> : <NodeUpdate node={node} orgs={orgs} onChange={this.changeProps}/>}
+            {!node ? <div className="empty">鏈�変腑</div> : <NodeUpdate node={node} orgs={orgs} onChange={this.changeProps} onDel={this.delCell}/>}
           </div>
         </div>
       </div>

--
Gitblit v1.8.0