king
2023-10-19 072227ec43346c50c93cda3bf21c346f463eb551
src/menu/components/table/normal-table/columns/editColumn/index.jsx
@@ -17,7 +17,7 @@
  picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'blacklist', 'scale', 'lenWidRadio', 'backgroundSize', 'span'],
  video: ['label', 'field', 'type', 'Align', 'Hide', 'startTime', 'Width', 'blacklist', 'aspectRatio'],
  colspan: ['label', 'type', 'Align', 'Hide', 'blacklist'],
  custom: ['label', 'type', 'Align', 'Width', 'blacklist'],
  custom: ['label', 'type', 'Align', 'Width', 'blacklist', 'IsSort'],
  action: ['label', 'type', 'Align', 'Width'],
  formula: ['label', 'type', 'Align', 'Hide', 'Width', 'prefix', 'postfix', 'eval', 'formula', 'blacklist'],
  index: ['label', 'type', 'Align', 'Width']
@@ -93,10 +93,10 @@
      } else if (this.record.perspective === 'linkurl') {
        _options.push('linkurl', 'linkfields', 'open')
      }
    }
    if (this.record.type === 'formula' && this.record.eval === 'true') {
    } else if (this.record.type === 'formula' && this.record.eval === 'true') {
      _options.push('decimal')
    } else if (this.record.type === 'custom' && this.record.IsSort === 'true') {
      _options.push('sortField')
    }
    return _options
@@ -106,6 +106,10 @@
    this.record[key] = value
    if (key === 'type') {
      if (['link', 'textarea', 'picture', 'custom'].includes(value)) {
        this.record.IsSort = 'false'
      }
      let _options = this.getOptions()
      let _field = ''
@@ -125,7 +129,7 @@
          return item
        })
      }, () => {
        if (value === 'link' || value === 'textarea' || value === 'picture') {
        if (['link', 'textarea', 'picture', 'custom'].includes(value)) {
          this.props.form.setFieldsValue({IsSort: 'false'})
        } else if (value === 'text' || value === 'number') {
          this.props.form.setFieldsValue({perspective: ''})
@@ -174,7 +178,7 @@
      }
    } else if (key === 'format' && value === 'percent') {
      this.props.form.setFieldsValue({postfix: '%'})
    } else if (['perspective', 'eval'].includes(key)) {
    } else if (['perspective', 'eval', 'IsSort'].includes(key)) {
      let _options = this.getOptions()
      this.setState({