From da64ab0923bf8817fc8599a6e37b953ce38f64c8 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 27 八月 2023 18:37:36 +0800
Subject: [PATCH] 2023-08-27

---
 src/menu/components/card/cardcellcomponent/elementform/index.jsx |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/menu/components/card/cardcellcomponent/elementform/index.jsx b/src/menu/components/card/cardcellcomponent/elementform/index.jsx
index 10007af..3d140fc 100644
--- a/src/menu/components/card/cardcellcomponent/elementform/index.jsx
+++ b/src/menu/components/card/cardcellcomponent/elementform/index.jsx
@@ -19,7 +19,7 @@
   number: ['eleType', 'datatype', 'width', 'height', 'prefix', 'postfix', 'noValue', 'fixStyle', 'alignItems'],
   picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'maxWidth', 'link', 'noValue'],
   video: ['eleType', 'datatype', 'width', 'aspectRatio', 'autoPlay', 'loop', 'startTime', 'noValue', 'posterType'],
-  icon: ['eleType', 'datatype', 'width', 'tooltip'],
+  icon: ['eleType', 'datatype', 'tipType', 'width', 'tooltip'],
   slider: ['eleType', 'datatype', 'width', 'color', 'maxValue', 'showInfo', 'showType', 'strokeWidth', 'strokeLinecap', 'trailColor'],
   splitline: ['eleType', 'color', 'width', 'borderWidth'],
   barcode: ['eleType', 'datatype', 'width', 'barHeight', 'displayValue', 'interval', 'noValue'],
@@ -199,8 +199,13 @@
     } else if (this.record.eleType === 'icon') {
       if (this.record.datatype === 'dynamic') {
         _options.push('field', 'noValue')
+      } else if (this.record.tipType === 'text') {
+        _options.push('value')
       } else {
         _options.push('icon')
+      }
+      if (this.record.tipType === 'text') {
+        _options.push('height')
       }
     } else if (this.record.eleType === 'formula' && this.record.eval === 'true') {
       _options.push('decimal')
@@ -336,7 +341,7 @@
           return item
         })
       })
-    } else if (['datatype', 'showInfo', 'showType', 'fixStyle', 'posterType', 'eval', 'linkType'].includes(key)) {
+    } else if (['datatype', 'showInfo', 'showType', 'fixStyle', 'posterType', 'eval', 'linkType', 'tipType'].includes(key)) {
       let _options = this.getOptions()
 
       this.setState({
@@ -556,10 +561,11 @@
           </Col>
         )
       } else if (item.type === 'file') {
-        let type = this.state.eleType
+        let type = this.record.eleType
         if (item.key === 'posterUrl') {
           type = 'picture'
         }
+
         fields.push(
           <Col span={12} key={index}>
             <Form.Item label={item.tooltip ?
@@ -621,7 +627,7 @@
           values.marks = this.props.card.marks || null
 
           // eslint-disable-next-line
-          if (values.eleType === 'formula' && values.eval !== 'false' && /^[\u4E00-\u9FA50-9a-zA-Z_\s@\+\-\*\/]*$/ig.test(values.formula) && /[\+\-\*\/]/ig.test(values.formula)) {
+          if (values.eleType === 'formula' && values.eval === 'true' && /^[\u4E00-\u9FA50-9a-zA-Z_\s@\+\-\*\/]*$/ig.test(values.formula) && /[\+\-\*\/]/ig.test(values.formula)) {
             let cols = []
             config.subColumns && config.subColumns.forEach(col => {
               if (/^(Int|Decimal)/ig.test(col.datatype)) {

--
Gitblit v1.8.0