From b69b5f6329ca5f87932436b7a6c1ddfc3377e10f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 16 五月 2024 10:56:41 +0800 Subject: [PATCH] 2024-05-16 --- src/menu/components/card/cardcomponent/options.jsx | 103 +++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 91 insertions(+), 12 deletions(-) diff --git a/src/menu/components/card/cardcomponent/options.jsx b/src/menu/components/card/cardcomponent/options.jsx index dfbcf7c..28d5b82 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 = [ { @@ -55,6 +61,24 @@ }, { type: 'radio', + field: 'cardRole', + label: '鍗$墖瑙掕壊', + initval: setting.cardRole || 'card', + required: false, + options: [ + {value: 'card', label: '灞炴�у崱'}, + {value: 'header', label: '琛ㄦ牸澶达紙鍙帓搴忥級'}, + ], + controlFields: [ + {field: 'type', values: ['card']}, + {field: 'click', values: ['card']}, + {field: 'btnControl', values: ['card']}, + ], + del: true, + forbid: cardType !== 'extendCard' + }, + { + type: 'radio', field: 'type', label: '鍗$墖绫诲瀷', initval: setting.type || 'simple', @@ -67,7 +91,7 @@ controlFields: [ {field: 'transform', values: ['multi']}, ], - forbid: appType === 'mob' + forbid: appType === 'mob' || subtype === 'dualdatacard' }, { type: 'select', @@ -85,7 +109,8 @@ {value: 'opacity', label: '閫忔槑搴�'}, {value: 'rotateX', label: '绾靛悜灞曞紑'}, {value: 'rotateY', label: '妯悜灞曞紑'}, - ] + ], + forbid: appType === 'mob' || subtype === 'dualdatacard' }, { type: 'text', @@ -97,11 +122,21 @@ forbid: subtype !== 'propcard' }, { - type: !hasMenus ? 'radio' : 'select', + type: 'select', + field: 'bgField', + label: '鑳屾櫙鍥�', + initval: setting.bgField || '', + tooltip: '鍔ㄦ�佽儗鏅紝鑳屾櫙鍥剧墖鐢卞瓧娈靛�兼帶鍒躲�傝娉ㄦ剰璋冩暣鑳屾櫙鏍峰紡銆�', + required: false, + options: columns, + forbid: cardType === 'extendCard' + }, + { + type: ops.length === 0 ? 'radio' : 'select', field: 'click', label: '鐐瑰嚮浜嬩欢', initval: setting.click || '', - tooltip: '褰撶粦瀹氱偣鍑讳簨浠舵椂锛屽崱鐗囩殑鍒囨崲鍔熻兘灏嗗け鏁堛��', + // tooltip: '褰撶粦瀹氱偣鍑讳簨浠舵椂锛屽崱鐗囩殑鍒囨崲鍔熻兘灏嗗け鏁堛��', required: false, options: [ {value: '', label: '鏃�'}, @@ -114,11 +149,13 @@ {field: 'menu', values: ['menu']}, {field: 'linkurl', values: ['link']}, {field: 'open', values: ['menu', 'link', 'menus']}, - {field: 'joint', values: ['menu', 'link', 'menus']}, + {field: 'joint', values: ['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 +171,7 @@ field: 'menu', label: '鍏宠仈鑿滃崟', initval: setting.menu || (appType ? '' : []), + tooltip: `琛屼俊鎭�${appType ? '锛堝瓧娈甸泦涓墠40涓暱搴︿笉瓒呰繃256鐨勫瓧娈碉級' : ''}灏嗕紶閫掕嚦姝よ彍鍗曪紝鍙湪url鍙橀噺銆佽〃鍗曪紙鍏宠仈涓昏〃锛夈�侀潤鎬佸睘鎬у崱銆佹诞鍔ㄥ崱涓娇鐢ㄣ�俙, required: true, extendName: 'MenuNo', options: menulist, @@ -143,9 +181,26 @@ field: 'linkurl', label: '閾炬帴', initval: setting.linkurl || '', + tooltip: '鍦ㄩ摼鎺ヤ腑浠***@褰㈠紡鎷兼帴鐨勫瓧娈碉紙瀛楁鏉ユ簮浜庡瓧娈甸泦涓紝姝ゅ id銆乤ppkey銆乽serid銆丩oginUID 涓虹郴缁熷瓧娈碉級锛岃烦杞椂灏嗘浛鎹负瀵瑰簲鍊硷紝渚嬪锛歨ttp://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@锛屽叾涓璦ppkey涓嶭oginUID灏嗚鏇挎崲銆�', + toolWidth: 350, required: true, options: [], 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', @@ -154,10 +209,10 @@ 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', @@ -180,6 +235,17 @@ }, { type: 'radio', + field: 'layout', + label: '鍏冪礌甯冨眬', + initval: setting.layout || 'grid', + required: false, + options: [ + {value: 'grid', label: '鏍呮牸甯冨眬'}, + {value: 'flex', label: '寮规�у竷灞�'}, + ] + }, + { + type: 'radio', field: 'clickType', label: '瑙﹀彂鏂瑰紡', initval: setting.clickType || 'normal', @@ -195,7 +261,7 @@ field: 'btnControl', label: '鎸夐挳鎺у埗', initval: setting.btnControl || 'show', - tooltip: '鍙缃寜閽樉绀鸿鍒欙紝涓�鐩存樉绀烘垨榧犳爣鎮诞鏃舵樉绀恒��', + tooltip: '鍙缃寜閽樉绀鸿鍒欙紝濮嬬粓鏄剧ず鎴栭紶鏍囨偓娴椂鏄剧ず銆�', required: false, options: [ {value: 'show', label: '姝e父鏄剧ず'}, @@ -204,13 +270,26 @@ forbid: appType === 'mob' }, { + type: 'radio', + field: 'checkAll', + label: '鍏ㄩ��', + initval: setting.checkAll || 'hidden', + tooltip: '鍏ㄩ�変粎鍦ㄦ暟鎹崱鍙閫夛紝涓旈�変腑椋庢牸涓哄嬀閫夋鏃舵湁鏁堛��', + required: false, + options: [ + {value: 'hidden', label: '闅愯棌'}, + {value: 'show', label: '鏄剧ず'}, + ], + forbid: cardType !== 'extendCard' + }, + { type: 'table', field: 'menus', label: '鑿滃崟缁�', initval: menus, required: true, span: 24, - actions: ['view'], + actions: ['edit', 'del', 'add', 'move', 'view'], columns: [ { title: '鏍囪瘑', @@ -219,7 +298,7 @@ editable: true, unique: true, required: false, - width: '35%' + width: '30%' }, { title: '鑿滃崟', @@ -228,7 +307,7 @@ editable: true, required: true, extends: !appType ? 'Menu' : [{key: 'label', value: 'label'}], - width: '35%', + width: '40%', render: (text, record) => record.label, options: menulist } -- Gitblit v1.8.0