king
2020-12-23 e9640ccdc9fe57f91919e3f51462c780e44fadb0
src/menu/components/table/normal-table/columns/editColumn/index.jsx
@@ -107,6 +107,13 @@
      })
    } else if (key === 'field') {
      this.props.form.setFieldsValue({label: option.props.children})
      if (this.state.type === 'number') {
        let decimal = 0
        if (/Decimal/ig.test(option.props.datatype)) {
          decimal = +option.props.datatype.replace(/Decimal\(18,/ig, '').replace(')', '')
        }
        this.props.form.setFieldsValue({decimal})
      }
    } else if (key === 'format' && value === 'percent') {
      this.props.form.setFieldsValue({postfix: '%'})
    }
@@ -140,7 +147,7 @@
    if (!formlist) return null
    formlist.forEach((item, index) => {
      if (item.hidden) return
      if (item.hidden || item.forbidden) return
      if (item.type === 'text') { // 文本搜索
        let rules = []
@@ -213,7 +220,7 @@
                  getPopupContainer={() => document.getElementById('columnwinter')}
                >
                  {item.options.map((option, index) =>
                    <Select.Option key={`${option.value || option.field}${index}`} value={option.value || option.field}>
                    <Select.Option key={`${option.value || option.field}${index}`} datatype={option.datatype || ''} value={option.value || option.field}>
                      {option.text || option.label}
                    </Select.Option>
                  )}