From 53b9fb93d0376eb02bb996935f1720b4e95cd897 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 12 十月 2022 14:41:06 +0800 Subject: [PATCH] 2022-10-12 --- src/menu/components/card/cardcomponent/options.jsx | 50 ++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 44 insertions(+), 6 deletions(-) diff --git a/src/menu/components/card/cardcomponent/options.jsx b/src/menu/components/card/cardcomponent/options.jsx index b4bdd99..a2faaf0 100644 --- a/src/menu/components/card/cardcomponent/options.jsx +++ b/src/menu/components/card/cardcomponent/options.jsx @@ -40,6 +40,12 @@ if (hasMenus) { ops = [{value: 'menus', label: '鑿滃崟缁�'}] } + let adapters = sessionStorage.getItem('adapter') || '' + if (adapters.indexOf('wxmini') > -1) { + ops.push({value: 'miniprogram', label: '灏忕▼搴�'}) + } else if (setting.click === 'miniprogram') { + setting.click = '' + } const cardSettingForm = [ { @@ -97,11 +103,11 @@ forbid: subtype !== 'propcard' }, { - type: !hasMenus ? 'radio' : 'select', + type: ops.length === 0 ? 'radio' : 'select', field: 'click', label: '鐐瑰嚮浜嬩欢', initval: setting.click || '', - tooltip: '褰撶粦瀹氱偣鍑讳簨浠舵椂锛屽崱鐗囩殑鍒囨崲鍔熻兘灏嗗け鏁堛��', + // tooltip: '褰撶粦瀹氱偣鍑讳簨浠舵椂锛屽崱鐗囩殑鍒囨崲鍔熻兘灏嗗け鏁堛��', required: false, options: [ {value: '', label: '鏃�'}, @@ -114,10 +120,13 @@ {field: 'menu', values: ['menu']}, {field: 'linkurl', values: ['link']}, {field: 'open', values: ['menu', 'link', 'menus']}, - {field: 'joint', values: ['menu', 'link', 'menus']}, + {field: 'joint', values: ['menu', 'link', 'menus', 'miniprogram']}, {field: 'linkbtn', values: ['button']}, + {field: 'clickType', values: ['button']}, {field: 'menuType', values: ['menus']}, {field: 'menus', values: ['menus']}, + {field: 'miniAppId', values: ['miniprogram']}, + {field: 'miniPath', values: ['miniprogram']}, ] }, { @@ -134,6 +143,7 @@ label: '鍏宠仈鑿滃崟', initval: setting.menu || (appType ? '' : []), required: true, + extendName: 'MenuNo', options: menulist, }, { @@ -146,16 +156,31 @@ span: 24 }, { + type: 'text', + field: 'miniAppId', + label: '灏忕▼搴廇ppID', + initval: setting.miniAppId || '', + required: true + }, + { + type: 'text', + field: 'miniPath', + label: '椤甸潰璺緞', + initval: setting.miniPath || '', + tooltip: '鍙寚瀹氳烦杞皬绋嬪簭椤甸潰锛屼负绌烘椂鎵撳紑棣栭〉锛屾敞锛氬弬鏁版嫾鎺ュ湪鎸囧畾椤甸潰鏃舵湁鏁堛��', + required: false + }, + { type: 'radio', field: 'open', label: '鎵撳紑鏂瑰紡', initval: setting.open || 'blank', required: false, options: [ - {value: 'blank', label: '鏂扮獥鍙�'}, - {value: 'self', label: '褰撳墠绐楀彛'}, + {value: 'blank', label: appType !== 'mob' ? '鏂扮獥鍙�' : '鏂伴〉闈�'}, + {value: 'self', label: appType !== 'mob' ? '褰撳墠绐楀彛' : '褰撳墠椤甸潰'}, ], - forbid: appType !== 'pc' + forbid: appType !== 'pc' && appType !== 'mob' }, { type: 'radio', @@ -178,6 +203,18 @@ }, { type: 'radio', + field: 'clickType', + label: '瑙﹀彂鏂瑰紡', + initval: setting.clickType || 'normal', + required: false, + options: [ + {value: 'normal', label: '鍗曞嚮'}, + {value: 'multi', label: '鍙屽嚮'}, + ], + forbid: appType === 'mob' + }, + { + type: 'radio', field: 'btnControl', label: '鎸夐挳鎺у埗', initval: setting.btnControl || 'show', @@ -196,6 +233,7 @@ initval: menus, required: true, span: 24, + actions: ['view'], columns: [ { title: '鏍囪瘑', -- Gitblit v1.8.0