From b91c28df2f734b680198e755b7828666e238cea0 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 21 六月 2024 16:43:44 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/menu/components/card/cardcellcomponent/elementform/index.jsx |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/src/menu/components/card/cardcellcomponent/elementform/index.jsx b/src/menu/components/card/cardcellcomponent/elementform/index.jsx
index 992eff8..0b03681 100644
--- a/src/menu/components/card/cardcellcomponent/elementform/index.jsx
+++ b/src/menu/components/card/cardcellcomponent/elementform/index.jsx
@@ -1,7 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { fromJS } from 'immutable'
-import { Form, Row, Col, Input, Select, Radio, Tooltip, InputNumber, Cascader, Popover, message, AutoComplete } from 'antd'
+import { Form, Row, Col, Input, Select, Radio, Checkbox, Tooltip, InputNumber, Cascader, Popover, message, AutoComplete } from 'antd'
 import { QuestionCircleOutlined } from '@ant-design/icons'
 
 import { formRule } from '@/utils/option.js'
@@ -228,7 +228,7 @@
       }
     } else if (this.record.eleType === 'formula') {
       if (this.record.eval !== 'func') {
-        _options.push('prefix', 'postfix', 'fixStyle', 'alignItems')
+        _options.push('prefix', 'postfix', 'fixStyle', 'alignItems', 'evalchars')
       }
       if (this.record.eval === 'true') {
         _options.push('decimal')
@@ -578,6 +578,24 @@
             </Form.Item>
           </Col>
         )
+      } else if (item.type === 'checkbox') {
+        fields.push(
+          <Col span={12} key={index}>
+            <Form.Item label={label}>
+              {getFieldDecorator(item.key, {
+                initialValue: item.initVal,
+                rules: [{
+                  required: item.required,
+                  message: '璇烽�夋嫨' + item.label + '!'
+                }]
+              })(
+                <Checkbox.Group style={{whiteSpace: 'nowrap'}}>
+                  {item.options.map(option => <Checkbox key={option.value} value={option.value}>{option.text}</Checkbox>)}
+                </Checkbox.Group>
+              )}
+            </Form.Item>
+          </Col>
+        )
       } else if (item.type === 'color') {
         fields.push(
           <Col span={12} key={index} className="color-form">

--
Gitblit v1.8.0