From 96bcbb7d0c3ad68344b792c2ce3ba0cb7d82a4a7 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 13 六月 2022 17:33:41 +0800 Subject: [PATCH] 2022-06-13 --- src/tabviews/zshare/mutilform/index.jsx | 4 ++-- src/templates/modalconfig/settingform/index.jsx | 11 ++++++----- src/templates/zshare/formconfig.jsx | 8 ++++---- src/utils/option.js | 1 - src/mob/components/formdragelement/index.jsx | 4 ++++ src/templates/sharecomponent/searchcomponent/searchform/index.jsx | 4 ++-- src/templates/zshare/verifycard/billcodeform/index.jsx | 3 +-- 7 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/mob/components/formdragelement/index.jsx b/src/mob/components/formdragelement/index.jsx index 45f4207..7ff6d39 100644 --- a/src/mob/components/formdragelement/index.jsx +++ b/src/mob/components/formdragelement/index.jsx @@ -119,6 +119,10 @@ style.paddingRight = setting.paddingRight } + if (setting.display === 'drawer' && (setting.placement === 'top' || setting.placement === 'bottom') && setting.width !== 100) { + style.minHeight = 'auto' + } + return ( <div ref={drop} className="ant-row modal-fields-row mob-form" style={style}> {cards.map(card => { diff --git a/src/tabviews/zshare/mutilform/index.jsx b/src/tabviews/zshare/mutilform/index.jsx index 73115be..e6dc625 100644 --- a/src/tabviews/zshare/mutilform/index.jsx +++ b/src/tabviews/zshare/mutilform/index.jsx @@ -254,8 +254,8 @@ }) } else if (item.regular === 'letter&number') { _rules.push({ - pattern: /^[a-zA-Z0-9]*$/ig, - message: formRule.input.letternummsg + pattern: /^[a-zA-Z0-9_]*$/ig, + message: '璇疯緭鍏ユ暟瀛椼�佸瓧姣嶄互鍙奯' }) } else if (item.regular === 'phone') { _rules.push({ diff --git a/src/templates/modalconfig/settingform/index.jsx b/src/templates/modalconfig/settingform/index.jsx index 87fe386..2d6cc85 100644 --- a/src/templates/modalconfig/settingform/index.jsx +++ b/src/templates/modalconfig/settingform/index.jsx @@ -17,6 +17,7 @@ state = { fields: null, display: this.props.config.setting.display || 'modal', + placement: this.props.config.setting.placement || 'right', appType: sessionStorage.getItem('appType'), dialogInput: false } @@ -76,7 +77,7 @@ render() { const { config } = this.props - const { fields, appType, display } = this.state + const { fields, appType, display, placement } = this.state const { getFieldDecorator } = this.props.form const formItemLayout = { @@ -128,9 +129,9 @@ </Col> {display === 'drawer' || display === 'modal' ? <Col span={12}> <Form.Item label={ - <Tooltip placement="topLeft" title="瀹藉害灏忎簬100鏃朵负鐧惧垎鐜囷紝澶т簬100鏃朵负缁濆鍊笺��"> + <Tooltip placement="topLeft" title="灏忎簬100鏃朵负鐧惧垎鐜囷紝澶т簬100鏃朵负缁濆鍊笺��"> <QuestionCircleOutlined className="mk-form-tip" /> - 瀹藉害 + {display === 'drawer' && (placement === 'top' || placement === 'bottom') ? '楂樺害' : '瀹藉害'} </Tooltip> }> {getFieldDecorator('width', { @@ -259,9 +260,9 @@ {display === 'drawer' ? <Col span={12}> <Form.Item label="鎶藉眽鏂瑰悜"> {getFieldDecorator('placement', { - initialValue: config.setting.placement || 'right' + initialValue: placement })( - <Radio.Group style={{whiteSpace: 'nowrap'}}> + <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => this.setState({placement: e.target.value})}> <Radio value="right">鍙充晶</Radio> <Radio value="left">宸︿晶</Radio> <Radio value="top">涓婁晶</Radio> diff --git a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx index 238c641..f8b115b 100644 --- a/src/templates/sharecomponent/searchcomponent/searchform/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/searchform/index.jsx @@ -421,7 +421,7 @@ complete = (key, option) => { let label = option.props.label - + this.props.form.setFieldsValue({label: label}) } @@ -463,7 +463,7 @@ if (item.key === 'field' && item.options && item.options.length > 0) { content = <AutoComplete - dataSource={item.options.map((cell) => <AutoComplete.Option label={cell.label} key={cell.key}> + dataSource={item.options.map((cell) => <AutoComplete.Option label={cell.label} value={cell.value} key={cell.key}> {cell.text} </AutoComplete.Option>)} filterOption={(input, option) => option.props.children.indexOf(input) > -1} diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index 1f15a39..62974bd 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -2901,16 +2901,16 @@ initVal: card.regular || '', options: [{ value: '', - text: Formdict['model.empty'] + text: '绌�' }, { value: 'number', - text: Formdict['model.form.number'] + text: '鏁板瓧' }, { value: 'letter', - text: Formdict['header.form.letter'] + text: '瀛楁瘝' }, { value: 'letter&number', - text: '瀛楁瘝+鏁板瓧' + text: '鏁板瓧銆佸瓧姣嶄互鍙奯' }, { value: 'phone', text: '鎵嬫満鍙�' diff --git a/src/templates/zshare/verifycard/billcodeform/index.jsx b/src/templates/zshare/verifycard/billcodeform/index.jsx index a5ac2c7..c33ab64 100644 --- a/src/templates/zshare/verifycard/billcodeform/index.jsx +++ b/src/templates/zshare/verifycard/billcodeform/index.jsx @@ -4,7 +4,6 @@ import { Form, Row, Col, Select, Button, InputNumber, Input, Tooltip } from 'antd' import { QuestionCircleOutlined } from '@ant-design/icons' -import { formRule } from '@/utils/option.js' import './index.scss' @@ -366,7 +365,7 @@ }, { pattern: /^[a-zA-Z0-9]*$/ig, - message: formRule.input.letternummsg + message: '璇疯緭鍏ユ暟瀛椼�佸瓧姣嶄互鍙奯' } ] })(<Input placeholder="" autoComplete="off" />)} diff --git a/src/utils/option.js b/src/utils/option.js index bfdd2e3..81244bb 100644 --- a/src/utils/option.js +++ b/src/utils/option.js @@ -17,7 +17,6 @@ formMessage: '鏈�澶欯max涓瓧绗︺��', // 鏂囨湰琛ㄥ崟鏈�澶ф彁绀� numbermsg: '璇疯緭鍏ユ暟瀛楋紒', lettermsg: '璇疯緭鍏ュ瓧姣嶏紒', - letternummsg: '璇疯緭鍏ユ暟瀛楁垨瀛楁瘝锛�', quotemsg: '涓嶅彲浣跨敤鑻辨枃鐘舵�佺殑鍗曞紩鍙凤紒', funcname: '璇疯緭鍏ユ暟瀛椼�佸瓧姣嶃�佹眽瀛椾互鍙奯' }, -- Gitblit v1.8.0