From ce70be666bcd78a7e16e739040488cf7e7256cc2 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 31 五月 2021 15:49:43 +0800 Subject: [PATCH] 2021-05-31 --- src/menu/components/form/normal-form/groupform/index.jsx | 25 +++++++++++++++++-------- 1 files changed, 17 insertions(+), 8 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..488cd6c 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,7 +143,7 @@ </Radio.Group> )} </Form.Item> - </Col> + </Col> : null} </Row> </Form> ) -- Gitblit v1.8.0