king
2019-12-21 65e310e342effbb7d98bd5f97b3404a44e3c5233
src/tabviews/commontable/mutilform/index.jsx
@@ -114,9 +114,16 @@
      formlist: formlist
    }, () => {
      if (action.setting && action.setting.focus) {
        let _item = document.getElementById(action.setting.focus)
        if (_item) {
          _item.select()
        try {
          let _form = document.getElementById('main-form-box')
          let _item = _form.getElementsByTagName('input')
          _item = [..._item]
          _item.forEach(input => {
            if (!input || input.id !== action.setting.focus) return
            input.select()
          })
        } catch {
          console.warn('表单获取失败!')
        }
      }
    })
@@ -202,7 +209,7 @@
          <Col span={24 / cols} key={index}>
            <Form.Item label={item.label}>
              {getFieldDecorator(item.field, {
                initialValue: item.initval || 'text',
                initialValue: item.initval || '',
                rules: [
                  {
                    required: item.required === 'true',
@@ -426,7 +433,7 @@
      }
    }
    return (
      <Form {...formItemLayout} className="ant-advanced-search-form main-form-field" id="form-box">
      <Form {...formItemLayout} className="ant-advanced-search-form main-form-field" id="main-form-box">
        <Row gutter={24}>{this.getFields()}</Row>
      </Form>
    )