From 318642cd6837a38a4bf5dfe059bcbb6cafe3bca8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 02 二月 2021 15:28:28 +0800 Subject: [PATCH] 2021-02-02 --- src/menu/components/share/actioncomponent/actionform/index.jsx | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index 5da6f2a..e584aea 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -557,8 +557,14 @@ <Col span={24} key={index}> <Form.Item label={item.label} className="textarea"> {getFieldDecorator(item.key, { - initialValue: item.initVal - })(<TextArea rows={2} />)} + initialValue: item.initVal, + rules: [ + { + required: item.readonly ? false : !!item.required, + message: this.props.dict['form.required.input'] + item.label + '!' + } + ] + })(<TextArea rows={2} readOnly={item.readonly}/>)} </Form.Item> </Col> ) @@ -650,7 +656,7 @@ } } return ( - <Form {...formItemLayout} className="ant-advanced-search-form commontable-action-form" id="winter"> + <Form {...formItemLayout} className="menu-action-list-form" id="winter"> <Row gutter={24}>{this.getFields()}</Row> </Form> ) -- Gitblit v1.8.0