From 55a1b8402fd258da084df9b8a3935eef8450247c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 01 八月 2021 18:03:02 +0800 Subject: [PATCH] 2021-08-01 --- src/menu/components/form/normal-form/groupform/index.jsx | 69 +++++++++++++++++++++++++++++++--- 1 files changed, 62 insertions(+), 7 deletions(-) diff --git a/src/menu/components/form/normal-form/groupform/index.jsx b/src/menu/components/form/normal-form/groupform/index.jsx index c1611f9..4f56a21 100644 --- a/src/menu/components/form/normal-form/groupform/index.jsx +++ b/src/menu/components/form/normal-form/groupform/index.jsx @@ -18,13 +18,22 @@ UNSAFE_componentWillMount () { const { group } = this.props + const { appType } = this.state let fields = [] - group.fields.forEach(f => { - if (f.field && ['select', 'link', 'text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') { - fields.push(f) - } - }) + if (appType === 'mob') { + group.fields.forEach(f => { + if (f.field && ['text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') { + fields.push(f) + } + }) + } else { + group.fields.forEach(f => { + if (f.field && ['select', 'link', 'text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') { + fields.push(f) + } + }) + } this.setState({ fields: fields @@ -55,7 +64,7 @@ render() { const { group, dict } = this.props const { getFieldDecorator } = this.props.form - const { fields } = this.state + const { fields, appType } = this.state const formItemLayout = { labelCol: { @@ -123,7 +132,7 @@ )} </Form.Item> </Col> - <Col span={12}> + {appType !== 'mob' ? <Col span={12}> <Form.Item label="琛ㄥ崟鎺掑垪"> {getFieldDecorator('align', { initialValue: group.setting.align || 'left_right' @@ -134,6 +143,52 @@ </Radio.Group> )} </Form.Item> + </Col> : null} + <Col span={12}> + <Form.Item label={ + <Tooltip placement="topLeft" title="绗竴缁勪笉鏄剧ず銆�"> + <Icon type="question-circle" /> + 涓婁竴姝� + </Tooltip> + }> + {getFieldDecorator('prevEnable', { + initialValue: group.prevButton.enable + })( + <Radio.Group> + <Radio value="true">鏄剧ず</Radio> + <Radio value="false">闅愯棌</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> + <Col span={12}> + <Form.Item label="鎻愪氦"> + {getFieldDecorator('subEnable', { + initialValue: group.subButton.enable + })( + <Radio.Group> + <Radio value="true">鏄剧ず</Radio> + <Radio value="false">闅愯棌</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> + <Col span={12}> + <Form.Item label={ + <Tooltip placement="topLeft" title="鏈�鍚庝竴缁勪笉鏄剧ず銆�"> + <Icon type="question-circle" /> + 璺宠繃 + </Tooltip> + }> + {getFieldDecorator('nextEnable', { + initialValue: group.nextButton.enable + })( + <Radio.Group> + <Radio value="true">鏄剧ず</Radio> + <Radio value="false">闅愯棌</Radio> + </Radio.Group> + )} + </Form.Item> </Col> </Row> </Form> -- Gitblit v1.8.0