From c474962c844397698544b49a37fd3384725f444c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 04 十一月 2021 22:09:06 +0800 Subject: [PATCH] 2021-11-04 --- src/menu/components/card/cardcomponent/options.jsx | 39 ++++++++++++++++++++++++++++++++++----- 1 files changed, 34 insertions(+), 5 deletions(-) diff --git a/src/menu/components/card/cardcomponent/options.jsx b/src/menu/components/card/cardcomponent/options.jsx index c59147a..6eff72a 100644 --- a/src/menu/components/card/cardcomponent/options.jsx +++ b/src/menu/components/card/cardcomponent/options.jsx @@ -1,8 +1,9 @@ /** * @description Setting琛ㄥ崟閰嶇疆淇℃伅 */ -export default function (setting, hasPrimaryKey, buttons = []) { +export default function (setting, subtype, buttons = [], cardType, columns) { let appType = sessionStorage.getItem('appType') + let hasMenus = subtype === 'datacard' && cardType !== 'extendCard' let menulist = [] let appmenulist = [] @@ -29,6 +30,11 @@ } else { menulist = [] } + } + + let ops = [] + if (hasMenus) { + ops = [{value: 'menus', label: '鑿滃崟缁�'}] } const cardSettingForm = [ @@ -84,10 +90,10 @@ initval: setting.primaryId || '', tooltip: '璁剧疆涓�涓睘鎬у崱闈欐�両D锛屽悜鍏朵粬缁勪欢浼犻�掔殑鎸囧畾闈欐�両D鍊�', required: false, - forbid: !hasPrimaryKey + forbid: subtype !== 'propcard' }, { - type: 'radio', + type: !hasMenus ? 'radio' : 'select', field: 'click', label: '鐐瑰嚮浜嬩欢', initval: setting.click || '', @@ -98,14 +104,24 @@ {value: 'menu', label: '鑿滃崟'}, {value: 'link', label: '閾炬帴'}, {value: 'button', label: '鎸夐挳'}, + ...ops ], controlFields: [ {field: 'menu', values: ['menu']}, {field: 'linkurl', values: ['link']}, - {field: 'open', values: ['menu', 'link']}, - {field: 'joint', values: ['menu', 'link']}, + {field: 'open', values: ['menu', 'link', 'menus']}, + {field: 'joint', values: ['menu', 'link', 'menus']}, {field: 'linkbtn', values: ['button']}, + {field: 'menuType', values: ['menus']}, ] + }, + { + type: 'select', + field: 'menuType', + label: '鑿滃崟绫诲瀷', + initval: setting.menuType || '', + required: true, + options: columns, }, { type: appType ? 'select' : 'cascader', @@ -154,6 +170,19 @@ initval: setting.linkbtn || '', required: true, options: buttons + }, + { + type: 'radio', + field: 'btnControl', + label: '鎸夐挳鎺у埗', + initval: setting.btnControl || 'show', + tooltip: '鍙缃寜閽樉绀鸿鍒欙紝涓�鐩存樉绀烘垨榧犳爣鎮诞鏃舵樉绀恒��', + required: false, + options: [ + {value: 'show', label: '姝e父鏄剧ず'}, + {value: 'hover', label: '鎮诞鏄剧ず'}, + ], + forbid: appType === 'mob' } ] -- Gitblit v1.8.0