From d1f19b794216b37417e114b71c1cd7a2ac3d7748 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 02 三月 2023 01:14:29 +0800 Subject: [PATCH] 2023-03-02 --- src/templates/modalconfig/settingform/index.jsx | 68 +++++++++++++++++++++++++++++---- 1 files changed, 59 insertions(+), 9 deletions(-) diff --git a/src/templates/modalconfig/settingform/index.jsx b/src/templates/modalconfig/settingform/index.jsx index 2d6cc85..b459117 100644 --- a/src/templates/modalconfig/settingform/index.jsx +++ b/src/templates/modalconfig/settingform/index.jsx @@ -19,6 +19,7 @@ display: this.props.config.setting.display || 'modal', placement: this.props.config.setting.placement || 'right', appType: sessionStorage.getItem('appType'), + viewType: sessionStorage.getItem('editMenuType') || '', dialogInput: false } @@ -44,6 +45,8 @@ let _display = display if (appType === 'mob' && display === 'modal') { _display = 'drawer' + } else if (appType !== 'mob' && display === 'dialog') { + _display = 'modal' } this.setState({ @@ -109,7 +112,7 @@ </Col> */} <Col span={24}> <Form.Item label={ - <Tooltip placement="topLeft" title="瀵硅瘽妗嗗湪浠呮湁涓�涓彲杈撳叆琛ㄥ崟锛堥潪闅愯棌銆侀潪鍙鐨勬枃鏈垨鏁板瓧锛夋椂鏈夋晥銆�"> + <Tooltip placement="topLeft" title="鍙�夋嫨琛ㄥ崟鐨勬樉绀哄舰寮忥紝娉細鏍囩鎵撳嵃鎸夐挳锛屾殏涓嶆敮鎸佷互鎶藉眽鏄剧ず琛ㄥ崟銆�"> <QuestionCircleOutlined className="mk-form-tip" /> 鏄剧ず鏂瑰紡 </Tooltip> @@ -122,7 +125,7 @@ <Radio value="drawer">鎶藉眽</Radio> <Radio value="prompt">鏄惁妗�</Radio> <Radio value="exec">鐩存帴鎵ц</Radio> - {/* <Radio value="dialog" disabled={dialogInput !== true}>瀵硅瘽妗�</Radio> */} + {appType !== 'mob' ? null : <Radio value="dialog">寮圭獥</Radio>} </Radio.Group> )} </Form.Item> @@ -139,7 +142,19 @@ })(<InputNumber min={10} max={2000} precision={0} onPressEnter={this.handleSubmit}/>)} </Form.Item> </Col> : null} - {display === 'drawer' || display === 'modal' ? <Col span={12}> + {display === 'dialog' && appType === 'mob' ? <Col span={12}> + <Form.Item label={ + <Tooltip placement="topLeft" title="灏忎簬100鏃朵负鐧惧垎鐜囷紝澶т簬100鏃朵负缁濆鍊笺�傜┖鍊兼椂瀹藉害鑷�傚簲銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 瀹藉害 + </Tooltip> + }> + {getFieldDecorator('width', { + initialValue: config.setting.width || '' + })(<InputNumber min={10} max={2000} precision={0} onPressEnter={this.handleSubmit}/>)} + </Form.Item> + </Col> : null} + {['dialog', 'drawer', 'modal'].includes(display) ? <Col span={12}> <Form.Item label="鍒濆鐒︾偣"> {getFieldDecorator('focus', { initialValue: config.setting.focus || '' @@ -158,7 +173,7 @@ )} </Form.Item> </Col> : null} - {display === 'drawer' || display === 'modal' ? <Col span={12}> + {['drawer', 'modal'].includes(display) ? <Col span={12}> <Form.Item label={ <Tooltip placement="topLeft" title="鎵ц澶辫触鏃堕渶瑕佽仛鐒︾殑琛ㄥ崟銆�"> <QuestionCircleOutlined className="mk-form-tip" /> @@ -228,7 +243,7 @@ </Radio.Group>)} </Form.Item> </Col> : null} - {display === 'drawer' || display === 'modal' ? <Col span={12}> + {['drawer', 'modal'].includes(display) ? <Col span={12}> <Form.Item label="瀹屾垚鍚�"> {getFieldDecorator('finish', { initialValue: config.setting.finish || 'close' @@ -240,7 +255,7 @@ )} </Form.Item> </Col> : null} - {display === 'drawer' || display === 'modal' ? <Col span={12}> + {['dialog', 'drawer', 'modal'].includes(display) ? <Col span={12}> <Form.Item label={ <Tooltip placement="topLeft" title="闇�瑕侀�氳繃鏁版嵁婧愭煡璇㈢殑閫夐」锛屾槸鍚︿娇鐢ㄧ紦瀛樸��"> <QuestionCircleOutlined className="mk-form-tip" /> @@ -258,7 +273,7 @@ </Form.Item> </Col> : null} {display === 'drawer' ? <Col span={12}> - <Form.Item label="鎶藉眽鏂瑰悜"> + <Form.Item label="寮瑰嚭鏂瑰悜"> {getFieldDecorator('placement', { initialValue: placement })( @@ -283,6 +298,24 @@ )} </Form.Item> </Col> : null} + {appType !== 'mob' && (display === 'drawer' || display === 'modal') ? <Col span={12}> + <Form.Item label={ + <Tooltip placement="topLeft" title="姝e父闂撮殭浼氶鐣欏嚭鎶ラ敊淇℃伅鐨勪綅缃紝闃叉琛ㄥ崟浣嶇疆鍙戠敓鍙樺寲銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 绔栧悜闂撮殭 + </Tooltip> + }> + {getFieldDecorator('verticalSpace', { + initialValue: config.setting.verticalSpace || 'normal' + })( + <Radio.Group> + <Radio value="normal">姝e父</Radio> + <Radio value="middle">涓�</Radio> + <Radio value="small">灏�</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> : null} {display === 'drawer' && appType !== 'mob' ? <Col span={12}> <Form.Item label="琛ㄥ崟绫诲瀷"> {getFieldDecorator('formType', { @@ -295,7 +328,7 @@ )} </Form.Item> </Col> : null} - {!this.props.isSubTab && !appType && display === 'modal' ? <Col span={12}> + {!this.props.isSubTab && !appType && this.state.viewType !== 'popview' && display === 'modal' ? <Col span={12}> <Form.Item label="鎸傝浇瀵硅薄"> {getFieldDecorator('container', { initialValue: config.setting.container || 'tab' @@ -307,7 +340,7 @@ )} </Form.Item> </Col> : null} - {display === 'drawer' || display === 'modal' ? <Col span={12}> + {['dialog', 'drawer', 'modal'].includes(display) ? <Col span={12}> <Form.Item label="鐐瑰嚮钂欏眰"> {getFieldDecorator('clickouter', { initialValue: config.setting.clickouter || 'unclose' @@ -319,6 +352,23 @@ )} </Form.Item> </Col> : null} + {!appType && display === 'modal' ? <Col span={12}> + <Form.Item label={ + <Tooltip placement="topLeft" title="鏄惁鍙嫋鎷界Щ鍔ㄦā鎬佹銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鍙Щ鍔� + </Tooltip> + }> + {getFieldDecorator('moveable', { + initialValue: config.setting.moveable || 'false' + })( + <Radio.Group> + <Radio value="false">鍚�</Radio> + <Radio value="true">鏄�</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> : null} </Row> </Form> ) -- Gitblit v1.8.0