From 38b5297cbfbe3d61ee2e800b51e8324ee163f43e Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 18 一月 2021 12:24:50 +0800 Subject: [PATCH] 2021-01-18 --- src/tabviews/zshare/mutilform/index.jsx | 32 +++++++++++++++++++++++++++++--- 1 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index ce1485e..ba0cddb 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -18,7 +18,7 @@ const CustomSwitch = asyncComponent(() => import('./customSwitch')) const FileUpload = asyncComponent(() => import('../fileupload')) const ColorSketch = asyncComponent(() => import('@/mob/colorsketch')) -// const Editor = asyncComponent(() => import('@/components/editor')) +const Editor = asyncComponent(() => import('@/components/editor')) class MainSearch extends Component { static propTpyes = { @@ -121,7 +121,7 @@ } let _fieldlen = item.fieldlength || 50 - if (item.type === 'textarea' || item.type === 'fileupload' || item.type === 'multiselect') { + if (item.type === 'textarea' || item.type === 'fileupload' || item.type === 'multiselect' || item.type === 'brafteditor') { _fieldlen = item.fieldlength || 512 } else if (item.type === 'number') { _fieldlen = item.decimal ? item.decimal : 0 @@ -1186,6 +1186,33 @@ </Form.Item> </Col> ) + } else if (item.type === 'brafteditor') { + let _max = item.fieldlength || 512 + + fields.push( + <Col span={24} key={index}> + <Form.Item label={item.tooltip ? + <Tooltip placement="topLeft" title={item.tooltip}> + <Icon type="question-circle" /> + {item.label} + </Tooltip> : item.label + }> + {getFieldDecorator(item.field, { + initialValue: item.initval || null, + rules: [ + { + required: item.required === 'true', + message: this.props.dict['form.required.input'] + item.label + '!' + }, + { + max: _max, + message: formRule.input.formMessage.replace('@max', _max) + } + ] + })(<Editor />)} + </Form.Item> + </Col> + ) } }) @@ -1373,7 +1400,6 @@ return ( <Form {...formItemLayout} className="ant-advanced-search-form main-form-field" id="main-form-box"> <Row className={'cols' + cols} gutter={24}>{this.getFields()}</Row> - {/* <Editor /> */} </Form> ) } -- Gitblit v1.8.0