From 8d66ff34fae5b048a6b7923cc75d34f13a08be9d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 02 八月 2022 11:42:43 +0800 Subject: [PATCH] Merge branch 'develop' --- src/views/mobdesign/menuform/index.jsx | 54 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 45 insertions(+), 9 deletions(-) diff --git a/src/views/mobdesign/menuform/index.jsx b/src/views/mobdesign/menuform/index.jsx index 38fb28c..13e2920 100644 --- a/src/views/mobdesign/menuform/index.jsx +++ b/src/views/mobdesign/menuform/index.jsx @@ -22,10 +22,14 @@ state = {} // 涓�浜岀骇鑿滃崟鍒囨崲 - selectChange = (key, value) => { - const { config } = this.props + selectChange = (key, value, hex) => { + let _config = {...this.props.config, [key]: value} - this.props.updateConfig({...config, [key]: value}) + if (key === 'statusBarbgColor' && hex) { + _config.statusBarHexColor = hex + } + + this.props.updateConfig(_config) // if (key === 'cacheUseful') { // this.props.updateConfig({...config, cacheUseful: value}) // } else if (key === 'timeUnit') { @@ -203,10 +207,27 @@ <Form.Item className="status-bar" label={ <Tooltip placement="topLeft" title="鍦ㄦ槑绉戜簯APP鎴栧皬绋嬪簭涓紝鐘舵�佹爮鐨勮儗鏅壊銆�"> <QuestionCircleOutlined className="mk-form-tip" /> - 鐘舵�佹爮 + 鐘舵�佹爮鑳屾櫙 </Tooltip> }> - <ColorSketch value={config.statusBarbgColor || '#ffffff'} onChange={(val) => {this.selectChange('statusBarbgColor', val)}} /> + <ColorSketch value={config.statusBarbgColor || '#ffffff'} onChange={(val, hex) => {this.selectChange('statusBarbgColor', val, hex)}} /> + </Form.Item> + </Col> : null} + {adapters.includes('wxmini') ? <Col span={24}> + <Form.Item className="status-bar-color" label={ + <Tooltip placement="topLeft" title="鍦ㄤ娇鐢ㄥ皬绋嬪簭鏃讹紝鐘舵�佹爮鐨勫瓧浣撻鑹层��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鐘舵�佹爮瀛椾綋 + </Tooltip> + }> + {getFieldDecorator('statusBarColor', { + initialValue: config.statusBarColor || 'black' + })( + <Radio.Group onChange={(e) => {this.selectChange('statusBarColor', e.target.value)}}> + <Radio value="black">榛戣壊</Radio> + <Radio value="white">鐧借壊</Radio> + </Radio.Group> + )} </Form.Item> </Col> : null} {adapters.includes('app') ? <Col span={24}> @@ -244,18 +265,24 @@ </Form.Item> </Col> : null} {adapters.includes('weixin') || adapters.includes('wxmini') ? <Col span={24}> - <Form.Item label="鍒嗕韩"> + <Form.Item label={ + <Tooltip placement="topLeft" title="浣跨敤榛樿鏃惰鍦ㄥ瓙搴旂敤璁剧疆鍒嗕韩淇℃伅锛屼娇鐢╱rl鍙傛暟浼氫娇鐢ㄤ笂椤靛弬鏁版浛鎹㈢浉搴斿瓧娈碉紙@field@锛夈�傛敞锛氫娇鐢ㄨ嚜瀹氫箟鎴杣rl鍙傛暟鏃朵細鍒嗕韩褰撳墠椤甸潰銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鍒嗕韩 + </Tooltip> + }> {getFieldDecorator('share', { initialValue: config.share || 'default' })( - <Radio.Group onChange={(e) => {this.selectChange('share', e.target.value)}}> + <Radio.Group className="mini-radio" onChange={(e) => {this.selectChange('share', e.target.value)}}> <Radio value="default">榛樿</Radio> <Radio value="custom">鑷畾涔�</Radio> + <Radio value="url">url鍙傛暟</Radio> </Radio.Group> )} </Form.Item> </Col> : null} - {config.share === 'custom' && (adapters.includes('weixin') || adapters.includes('wxmini')) ? <Col span={24}> + {['custom', 'url'].includes(config.share) && (adapters.includes('weixin') || adapters.includes('wxmini')) ? <Col span={24}> <Form.Item label="鍒嗕韩鏍囬"> {getFieldDecorator('share_title', { initialValue: config.share_title || '', @@ -268,7 +295,7 @@ })(<Input placeholder="" autoComplete="off" onChange={(e) => {this.selectChange('share_title', e.target.value)}}/>)} </Form.Item> </Col> : null} - {config.share === 'custom' && (adapters.includes('weixin') || adapters.includes('wxmini')) ? <Col span={24}> + {['custom', 'url'].includes(config.share) && (adapters.includes('weixin') || adapters.includes('wxmini')) ? <Col span={24}> <Form.Item label="鍒嗕韩鎻忚堪"> {getFieldDecorator('share_des', { initialValue: config.share_des || '' @@ -284,6 +311,15 @@ )} </Form.Item> </Col> : null} + {config.share === 'url' && (adapters.includes('weixin') || adapters.includes('wxmini')) ? <Col span={24}> + <Form.Item label="鍒嗕韩鍥剧墖"> + {getFieldDecorator('share_url', { + initialValue: config.share_url || '' + })( + <Input placeholder="" autoComplete="off" onChange={(e) => {this.selectChange('share_url', e.target.value)}}/> + )} + </Form.Item> + </Col> : null} <Col span={24}> <Form.Item label="澶囨敞"> {getFieldDecorator('Remark', { -- Gitblit v1.8.0