From fd60067ea3673be3eeb1314632d1389f503a3285 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 07 六月 2023 14:18:34 +0800
Subject: [PATCH] 2023-06-07

---
 src/menu/components/chart/antv-X6/index.jsx |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/src/menu/components/chart/antv-X6/index.jsx b/src/menu/components/chart/antv-X6/index.jsx
index c6c84cd..5ace0da 100644
--- a/src/menu/components/chart/antv-X6/index.jsx
+++ b/src/menu/components/chart/antv-X6/index.jsx
@@ -20,6 +20,7 @@
 
 const SettingComponent = asyncIconComponent(() => import('@/menu/datasource'))
 const ChartCompileForm = asyncIconComponent(() => import('./chartcompile'))
+const NodeUpdate = asyncIconComponent(() => import('./nodeupdate'))
 const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
 const NormalHeader = asyncComponent(() => import('@/menu/components/share/normalheader'))
 
@@ -664,6 +665,26 @@
     // let nodes = this.mkGraph.toJSON()
   }
 
+  changeProps = (value, key) => {
+    const { node } = this.state
+
+    if (node.shape === 'edge') {
+
+    } else {
+      if (key === 'title') {
+        this.selectNode.attr('text/text', value)
+      } else if (key === 'fill') {
+        this.selectNode.attr('body/fill', value)
+      } else if (key === 'stroke') {
+        this.selectNode.attr('body/stroke', value)
+      } else if (key === 'fontSize') {
+        this.selectNode.attr('text/fontSize', value)
+      } else if (key === 'fontFill') {
+        this.selectNode.attr('text/fill', value)
+      }
+    }
+  }
+
   updateComponent = (card) => {
     card.width = card.plot.width
     card.name = card.plot.name
@@ -760,7 +781,7 @@
               <DoubleLeftOutlined />
             </div>
             <div className="header">璁剧疆</div>
-            {!node ? <div className="empty">鏈�変腑</div> : <div></div>}
+            {!node ? <div className="empty">鏈�変腑</div> : <NodeUpdate node={node} onChange={this.changeProps}/>}
           </div>
         </div>
         <div className="component-name">

--
Gitblit v1.8.0