diff --git a/web/src/pages/SearchManage/AliasManage.js b/web/src/pages/SearchManage/AliasManage.js index 3367d590..609e37fc 100644 --- a/web/src/pages/SearchManage/AliasManage.js +++ b/web/src/pages/SearchManage/AliasManage.js @@ -37,7 +37,33 @@ const getValue = obj => .join(','); const statusMap = ['default', 'processing', 'success', 'error']; const status = ['关闭', '运行中', '已上线', '异常']; +const CreateForm = Form.create()(props => { + const { modalVisible, form, handleAdd, handleModalVisible } = props; + const okHandle = () => { + form.validateFields((err, fieldsValue) => { + if (err) return; + form.resetFields(); + handleAdd(fieldsValue); + }); + }; + return ( + handleModalVisible()} +> + + {form.getFieldDecorator('desc', { + rules: [{ required: true, message: '请输入至少五个字符的规则描述!', min: 5 }], + })()} + + +); +}); +@Form.create() class UpdateForm extends PureComponent { constructor(props) { super(props); @@ -159,20 +185,20 @@ class UpdateForm extends PureComponent { , ]; } - return [ - - {form.getFieldDecorator('name', { - rules: [{ required: true, message: '请输入索引名称!' }], - initialValue: formVals.name, - })()} - , - - {form.getFieldDecorator('desc', { - rules: [{ required: true, message: '请输入至少五个字符的索引描述!', min: 5 }], - initialValue: formVals.desc, - })(