From 73d56e1024cf420eff2aae3710886c84d56a385f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 04 六月 2022 14:48:36 +0800 Subject: [PATCH] 2022-06-04 --- src/menu/components/share/actioncomponent/actionform/index.jsx | 17 +++++++- src/menu/components/card/data-card/options.jsx | 12 ++++++ src/views/mobdesign/menuform/index.scss | 9 ++++ src/views/mobdesign/menuform/index.jsx | 23 +++++++++-- src/views/appmanage/submutilform/index.jsx | 7 +++ 5 files changed, 60 insertions(+), 8 deletions(-) diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx index 913aba8..6db48b9 100644 --- a/src/menu/components/card/data-card/options.jsx +++ b/src/menu/components/card/data-card/options.jsx @@ -120,6 +120,9 @@ {value: 'switch', label: '宸﹀彸鍒囨崲', forbid: appType === 'mob'}, {value: 'slide', label: '婊戝姩鍔犺浇', forbid: appType !== 'mob'}, ], + controlFields: [ + {field: 'slidetip', values: ['slide']}, + ], forbid: !(subtype === 'datacard' || (subtype === 'tablecard' && appType === 'mob')) }, { @@ -431,6 +434,15 @@ forbid: !!appType }, { + type: 'text', + field: 'slidetip', + label: '搴曢儴鎻愮ず', + initval: wrap.slidetip || wrap.slidetip === '' ? wrap.slidetip : '娌℃湁鏇村浜�', + tooltip: '婊戝姩鍔犺浇鑷冲簳閮ㄦ椂鐨勬彁绀轰俊鎭��', + required: false, + forbid: appType !== 'mob' + }, + { type: 'table', field: 'supNodes', label: '涓婄骇缁勪欢', diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index 4d95048..d4cfb8c 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -348,12 +348,23 @@ reRequired.linkmenu = false reTooltip.linkmenu = '浣跨敤鎵爜鐧诲綍鍔熻兘鎴栬彍鍗曡烦杞姛鑳芥椂锛岄渶閫夋嫨璺宠浆鐨勮彍鍗曘��' + } else if (_funcType === 'copyurl') { + shows.push('linkmenu') + + reRequired.linkmenu = false + reTooltip.linkmenu = '鍙互鎸囧畾鍒嗕韩鐨勭洰鏍囧湴鍧�銆�' + + if (this.record.linkmenu) { + shows.push('Ot') + reOptions.Ot = requireOptions.filter(op => ['notRequired', 'requiredSgl'].includes(op.value)) + } } else if (_funcType === 'goBack') { shows.push('reload') } else if (_funcType === 'megvii') { shows.push('subFunc', 'progress') } else if (_funcType === 'pay') { - shows.push('payType') + shows.push('payType', 'Ot') + reOptions.Ot = requireOptions.filter(op => ['requiredSgl'].includes(op.value)) } } @@ -668,7 +679,7 @@ if (item.extendName) { content = <Select showSearch - allowClear={item.allowClear === true} + allowClear={item.allowClear === true || !item.required} filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 || option.props.extend.toLowerCase().indexOf(input.toLowerCase()) >= 0} onChange={(value) => {this.optionChange(item.key, value)}} @@ -683,7 +694,7 @@ } else { content = <Select showSearch - allowClear={item.allowClear === true} + allowClear={item.allowClear === true || !item.required} filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} onChange={(value) => {this.optionChange(item.key, value)}} getPopupContainer={() => document.getElementById('winter')} diff --git a/src/views/appmanage/submutilform/index.jsx b/src/views/appmanage/submutilform/index.jsx index 8f21434..168c371 100644 --- a/src/views/appmanage/submutilform/index.jsx +++ b/src/views/appmanage/submutilform/index.jsx @@ -237,7 +237,12 @@ </Form.Item> </Col> : null} {exts.includes('share') ? <Col span={12}> - <Form.Item label="鍒嗕韩閾炬帴"> + <Form.Item label={ + <Tooltip placement="topLeft" title="鍒嗕韩鐨勯摼鎺ヤ负鐢ㄦ埛娴忚鐨勯〉闈㈠湴鍧�鎴栧綋鍓嶅簲鐢ㄧ殑鍏ュ彛鍦板潃銆傛敞锛氬彲鍦ㄩ〉闈腑鑷畾涔夎缃��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鍒嗕韩閾炬帴 + </Tooltip> + }> {getFieldDecorator('share_link', { initialValue: card ? card.share_link || 'main' : 'main' })( diff --git a/src/views/mobdesign/menuform/index.jsx b/src/views/mobdesign/menuform/index.jsx index 38fb28c..bf80a96 100644 --- a/src/views/mobdesign/menuform/index.jsx +++ b/src/views/mobdesign/menuform/index.jsx @@ -244,18 +244,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 +274,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 +290,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', { diff --git a/src/views/mobdesign/menuform/index.scss b/src/views/mobdesign/menuform/index.scss index 6bfb57a..d6268d8 100644 --- a/src/views/mobdesign/menuform/index.scss +++ b/src/views/mobdesign/menuform/index.scss @@ -22,4 +22,13 @@ } } } + .mini-radio { + .ant-radio-wrapper { + margin-right: 5px; + .ant-radio + span { + padding-right: 3px; + padding-left: 3px; + } + } + } } \ No newline at end of file -- Gitblit v1.8.0