From 81d0d7721bb14a34b1eef99fd9506c3eda4bda99 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 18 十月 2023 17:17:47 +0800 Subject: [PATCH] 2023-10-18 --- src/templates/modalconfig/settingform/index.jsx | 33 ++++++++++++++++++++++++++++++++- 1 files changed, 32 insertions(+), 1 deletions(-) diff --git a/src/templates/modalconfig/settingform/index.jsx b/src/templates/modalconfig/settingform/index.jsx index b459117..4ac0090 100644 --- a/src/templates/modalconfig/settingform/index.jsx +++ b/src/templates/modalconfig/settingform/index.jsx @@ -5,7 +5,11 @@ // import { formRule } from '@/utils/option.js' import StyleInput from '@/menu/stylecontroller/styleInput' +import asyncComponent from '@/utils/asyncComponent' import './index.scss' + +const MkEditIcon = asyncComponent(() => import('@/components/mkIcon')) +const ColorSketch = asyncComponent(() => import('@/mob/colorsketch')) class SettingForm extends Component { static propTpyes = { @@ -18,6 +22,7 @@ fields: null, display: this.props.config.setting.display || 'modal', placement: this.props.config.setting.placement || 'right', + icon: this.props.config.setting.icon || '', appType: sessionStorage.getItem('appType'), viewType: sessionStorage.getItem('editMenuType') || '', dialogInput: false @@ -80,7 +85,7 @@ render() { const { config } = this.props - const { fields, appType, display, placement } = this.state + const { fields, appType, display, placement, icon } = this.state const { getFieldDecorator } = this.props.form const formItemLayout = { @@ -197,6 +202,32 @@ )} </Form.Item> </Col> : null} + {appType !== 'mob' && display === 'modal' ? <Col span={12}> + <Form.Item label="鍥炬爣"> + {getFieldDecorator('icon', { + initialValue: icon + })(<MkEditIcon onChange={(value) => this.setState({icon: value})} allowClear={true}/>)} + </Form.Item> + </Col> : null} + {appType !== 'mob' && display === 'modal' && icon ? <Col span={12}> + <Form.Item label="鍥炬爣鏍峰紡"> + {getFieldDecorator('iconType', { + initialValue: config.setting.iconType || 'def' + })( + <Radio.Group> + <Radio value="def">榛樿</Radio> + <Radio value="circle">鍦嗗舰</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> : null} + {appType !== 'mob' && display === 'modal' && icon ? <Col span={12}> + <Form.Item label="鍥炬爣棰滆壊"> + {getFieldDecorator('iconColor', { + initialValue: config.setting.iconColor || '' + })(<ColorSketch allowClear={true}/>)} + </Form.Item> + </Col> : null} {appType === 'mob' && display === 'drawer' ? <Col span={12}> <Form.Item label={ <Tooltip placement="topLeft" title="琛ㄥ崟鍏冪礌涓庡乏渚ц竟鐣岀殑璺濈銆�"> -- Gitblit v1.8.0