king
2021-08-06 992f25d08ea2b5a6438ccc792a5c723b8a72f674
src/menu/components/card/cardcellcomponent/elementform/index.jsx
@@ -10,12 +10,13 @@
const { TextArea } = Input
const ColorSketch = asyncComponent(() => import('@/mob/colorsketch'))
const SourceComponent = asyncComponent(() => import('@/menu/components/share/sourcecomponent'))
const MkIcon = asyncComponent(() => import('@/components/mkIcon'))
const cardTypeOptions = {
  sequence: ['eleType', 'width'],
  text: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix', 'link'],
  number: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix'],
  picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'link'],
  picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'maxWidth', 'link', 'scale'],
  video: ['eleType', 'datatype', 'width', 'aspectRatio', 'autoPlay', 'loop'],
  icon: ['eleType', 'icon', 'datatype', 'width'],
  slider: ['eleType', 'datatype', 'width', 'color', 'maxValue'],
@@ -23,6 +24,7 @@
  barcode: ['eleType', 'datatype', 'width', 'barHeight', 'displayValue', 'interval'],
  qrcode: ['eleType', 'datatype', 'width', 'qrWidth', 'color', 'url'],
  currentDate: ['eleType', 'width', 'dateFormat', 'prefix', 'postfix'],
  formula: ['eleType', 'width', 'height', 'prefix', 'postfix', 'formula'],
}
class MainSearch extends Component {
@@ -104,9 +106,9 @@
        if (link === 'dynamic' || link === 'static' || link === 'custom') {
          _options.push('linkurl', 'joint')
        } else if (link === 'page') {
          _options.push('copyMenuId', 'joint')
          _options.push('copyMenuId', 'joint', 'open')
        } else if (link === 'linkpage') {
          _options.push('linkmenu', 'joint')
          _options.push('linkmenu', 'joint', 'open')
        }
      }
    } else if (eleType === 'icon') {
@@ -298,7 +300,7 @@
                    message: formRule.input.message
                  }
                ]
              })(<TextArea rows={2} disabled={item.readonly} />)}
              })(<TextArea rows={2} disabled={item.readonly} placeholder={item.placeholder || ''} />)}
            </Form.Item>
          </Col>
        )
@@ -353,6 +355,27 @@
            </Form.Item>
          </Col>
        )
      } else if (item.type === 'icon') {
        fields.push(
          <Col span={12} key={index}>
            <Form.Item label={item.tooltip ?
              <Tooltip placement="topLeft" title={item.tooltip}>
                <Icon type="question-circle" />
                {item.label}
              </Tooltip> : item.label
            }>
              {getFieldDecorator(item.key, {
                initialValue: item.initVal || '',
                rules: [{
                  required: !!item.required,
                  message: this.props.dict['form.required.select'] + item.label + '!'
                }]
              })(
                <MkIcon />
              )}
            </Form.Item>
          </Col>
        )
      } else if (item.type === 'radio') {
        fields.push(
          <Col span={12} key={index}>