From 16f80ddfc338bc65a893c1b7eb93d1d9861158b2 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 02 七月 2023 23:05:17 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx |   30 ++++++++++++++++++++++++++++--
 1 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx
index e423161..d279a75 100644
--- a/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx
+++ b/src/tabviews/custom/components/chart/antv-X6/nodeupdate/index.jsx
@@ -7,6 +7,8 @@
 
 import './index.scss'
 
+const { TextArea } = Input
+
 class NodeUpdate extends Component {
   static propTpyes = {
     node: PropTypes.object,
@@ -71,6 +73,8 @@
         lineType = 'dash'
       }
 
+      let font = node.labels && node.labels[0] ? node.labels[0].attrs.label : {}
+
       return [
         {
           type: 'title',
@@ -80,7 +84,7 @@
           type: 'text',
           field: 'title',
           label: '鏍囩',
-          initval: title
+          initval: font.text || ''
         },
         {
           type: 'title',
@@ -107,6 +111,22 @@
             {value: 'solid', text: '瀹炵嚎'},
             {value: 'dash', text: '铏氱嚎'}
           ]
+        },
+        {
+          type: 'title',
+          label: '鏍囩鏍峰紡'
+        },
+        {
+          type: 'number',
+          field: 'fontSize',
+          label: '瀛楀彿',
+          initval: font.fontSize || 14
+        },
+        {
+          type: 'color',
+          field: 'fontFill',
+          label: '棰滆壊',
+          initval: font.fill || '#000000'
         }
       ]
     } else if (node.shape === 'lane') {
@@ -228,7 +248,7 @@
           label: '鍐呭'
         },
         {
-          type: 'text',
+          type: 'textarea',
           field: 'title',
           label: '鏍囩',
           initval: title
@@ -387,6 +407,12 @@
             </Form.Item>
           </Col>
         )
+      } else if (item.type === 'textarea') {
+        fields.push(
+          <Col span={24} key={index} style={{padding: '0 12px'}}>
+            <TextArea defaultValue={item.initval} rows={3} onChange={(e) => this.change(e.target.value, item.field)} />
+          </Col>
+        )
       } else if (item.type === 'number') {
         fields.push(
           <Col span={24} key={index}>

--
Gitblit v1.8.0