From 0c84df247914f893ef5e41d57a422e10a2dc814c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 12 十一月 2021 17:02:06 +0800 Subject: [PATCH] 2021-11-12 --- src/templates/modalconfig/settingform/index.jsx | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 51 insertions(+), 9 deletions(-) diff --git a/src/templates/modalconfig/settingform/index.jsx b/src/templates/modalconfig/settingform/index.jsx index ebe4427..d2eea85 100644 --- a/src/templates/modalconfig/settingform/index.jsx +++ b/src/templates/modalconfig/settingform/index.jsx @@ -1,9 +1,11 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Form, Row, Col, Input, Radio, InputNumber, Select, Tooltip, Icon } from 'antd' +import { Form, Row, Col, Input, Radio, InputNumber, Select, Tooltip } from 'antd' +import { QuestionCircleOutlined } from '@ant-design/icons' + import { formRule } from '@/utils/option.js' import StyleInput from '@/menu/stylecontroller/styleInput' -import './index.scss' +// import './index.scss' class SettingForm extends Component { static propTpyes = { @@ -24,7 +26,7 @@ let fields = [] config.fields.forEach(f => { - if (f.field && ['select', 'link', 'text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') { + if (f.field && ['select', 'link', 'text', 'number', 'textarea'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') { fields.push(f) } }) @@ -79,7 +81,7 @@ } return ( - <Form {...formItemLayout} className="ant-advanced-search-form modal-setting-form"> + <Form {...formItemLayout}> <Row gutter={24}> <Col span={12}> <Form.Item label="鏍囬"> @@ -104,7 +106,7 @@ {appType === 'mob' ? <Col span={12}> <Form.Item label={ <Tooltip placement="topLeft" title="瀹藉害灏忎簬100鏃朵负鐧惧垎鐜囷紝澶т簬100鏃朵负缁濆鍊笺��"> - <Icon type="question-circle" /> + <QuestionCircleOutlined className="mk-form-tip" /> 瀹藉害 </Tooltip> }> @@ -135,7 +137,7 @@ <Col span={12}> <Form.Item label={ <Tooltip placement="topLeft" title="鎵ц澶辫触鏃堕渶瑕佽仛鐒︾殑琛ㄥ崟銆�"> - <Icon type="question-circle" /> + <QuestionCircleOutlined className="mk-form-tip" /> 澶辫触鐒︾偣 </Tooltip> }> @@ -180,7 +182,7 @@ )} </Form.Item> </Col> - <Col span={12}> + {appType !== 'mob' ? <Col span={12}> <Form.Item label="鐐瑰嚮绌虹櫧澶�"> {getFieldDecorator('clickouter', { initialValue: config.setting.clickouter || 'unclose' @@ -191,9 +193,31 @@ </Radio.Group> )} </Form.Item> + </Col> : null} + <Col span={12}> + <Form.Item label={ + <Tooltip placement="topLeft" title="闇�瑕侀�氳繃鏁版嵁婧愭煡璇㈢殑閫夐」锛屾槸鍚︿娇鐢ㄧ紦瀛樸��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 閫夐」鏌ヨ + </Tooltip> + }> + {getFieldDecorator('cache', { + initialValue: config.setting.cache || 'true' + })( + <Radio.Group> + <Radio value="true">缂撳瓨</Radio> + <Radio value="false">瀹炴椂</Radio> + </Radio.Group> + )} + </Form.Item> </Col> <Col span={12}> - <Form.Item label="鏄剧ず鏂瑰紡"> + <Form.Item label={ + <Tooltip placement="topLeft" title="鎵撳嵃鎸夐挳涓棤鏁堛��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鏄剧ず鏂瑰紡 + </Tooltip> + }> {getFieldDecorator('display', { initialValue: display || 'modal' })( @@ -231,7 +255,7 @@ )} </Form.Item> </Col> : null} - {display === 'drawer' ? <Col span={12}> + {display === 'drawer' && appType !== 'mob' ? <Col span={12}> <Form.Item label="琛ㄥ崟绫诲瀷"> {getFieldDecorator('formType', { initialValue: config.setting.formType || 'edit' @@ -261,6 +285,24 @@ )} </Form.Item> </Col> : null} + {appType === 'mob' ? <Col span={12}> + <Form.Item label="鎸夐挳鍚嶇О"> + {getFieldDecorator('btnName', { + initialValue: config.setting.btnName || '纭畾' + })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} + </Form.Item> + </Col> : null} + {appType === 'mob' ? <Col span={12}> + <Form.Item label="鎸夐挳浣嶇疆"> + {getFieldDecorator('btnPosition', { + initialValue: config.setting.btnPosition || 'bottom' + })( + <Radio.Group style={{whiteSpace: 'nowrap'}}> + <Radio value="bottom">涓嬩晶</Radio> + <Radio value="top">涓婁晶</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} </Row> </Form> ) -- Gitblit v1.8.0