king
2023-07-05 f45b2ad61211cf2821cdaab07676c7906c96410a
src/templates/sharecomponent/searchcomponent/settingform/index.jsx
@@ -12,14 +12,16 @@
  }
  state = {
    advanceType: ''
    advanceType: '',
    show: ''
  }
  UNSAFE_componentWillMount () {
    const { setting } = this.props
    this.setState({
      advanceType: setting.advanceType || 'modal'
      advanceType: setting.advanceType || 'modal',
      show: setting.show || 'true'
    })
  }
@@ -39,7 +41,7 @@
  render() {
    const { setting } = this.props
    const { getFieldDecorator } = this.props.form
    const { advanceType } = this.state
    const { advanceType, show } = this.state
    const formItemLayout = {
      labelCol: {
@@ -60,7 +62,7 @@
              {getFieldDecorator('show', {
                initialValue: setting.show || 'true'
              })(
                <Radio.Group>
                <Radio.Group onChange={(e) => this.setState({show: e.target.value})}>
                  <Radio value="true">显示</Radio>
                  <Radio value="false">隐藏</Radio>
                </Radio.Group>
@@ -152,6 +154,18 @@
              })(<InputNumber min={0} precision={0} onPressEnter={this.props.inputSubmit}/>)}
            </Form.Item>
          </Col>
          {show === 'true' ? <Col span={12}>
            <Form.Item label="重置时">
              {getFieldDecorator('resetContrl', {
                initialValue: setting.resetContrl || 'init',
              })(
                <Radio.Group>
                  <Radio value="init">恢复初始值</Radio>
                  <Radio value="clear">清空</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col> : null}
        </Row>
      </Form>
    )