From 1a176e4bdba485301385caac1a29102e598d25cc Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 13 五月 2025 11:32:02 +0800 Subject: [PATCH] 2025-05-13 --- src/menu/components/search/main-search/options.jsx | 72 ++++++++++++++++++++++++++++++++++-- 1 files changed, 68 insertions(+), 4 deletions(-) diff --git a/src/menu/components/search/main-search/options.jsx b/src/menu/components/search/main-search/options.jsx index 8f39286..0641d23 100644 --- a/src/menu/components/search/main-search/options.jsx +++ b/src/menu/components/search/main-search/options.jsx @@ -1,7 +1,8 @@ +import MenuUtils from '@/utils/utils-custom.js' /** * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 */ -export default function (wrap, action = []) { +export default function (wrap, uuid) { let roleList = sessionStorage.getItem('sysRoles') let appType = sessionStorage.getItem('appType') @@ -14,6 +15,9 @@ } else { roleList = [] } + + let menu = window.GLOB.customMenu + let modules = MenuUtils.getSupModules(menu.components, uuid, menu.interfaces) const wrapForm = [ { @@ -54,7 +58,7 @@ { type: 'radio', field: 'drawerPlacement', - label: '鎶藉眽鏂瑰悜', + label: '寮瑰嚭鏂瑰悜', initval: wrap.drawerPlacement || 'right', required: false, options: [ @@ -94,7 +98,7 @@ tooltip: '鎼滅储鎸夐挳璺濆乏渚х殑鐧惧垎姣旓紝鍙傜収鎼滅储鏉′欢鐨勫悕绉板搴︺��', min: 0, max: 100, - precision: 10, + precision: 1, required: true }, { @@ -117,7 +121,32 @@ options: [ {value: 'true', label: '鏄剧ず'}, {value: 'false', label: '闅愯棌'}, + ], + controlFields: [ + {field: 'borderRadius', values: ['true']}, + {field: 'resetContrl', values: ['true']} ] + }, + { + type: 'number', + field: 'borderRadius', + label: '鎸夐挳鍦嗚', + initval: wrap.borderRadius || '', + tooltip: '鎼滅储鍜岄噸缃寜閽殑鍦嗚銆�', + required: false + }, + { + type: 'radio', + field: 'resetContrl', + label: '閲嶇疆鏃�', + initval: wrap.resetContrl || 'init', + tooltip: '鍒锋柊鑿滃崟浼氭竻绌篣RL鍙橀噺銆�', + required: false, + options: [ + {value: 'init', label: '鎭㈠鍒濆鍊�'}, + {value: 'clear', label: '娓呯┖'}, + {value: 'refresh', label: '鍒锋柊鑿滃崟'}, + ], }, { type: 'radio', @@ -129,7 +158,42 @@ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType + forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' + }, + { + type: 'radio', + field: 'searchSize', + label: '鎼滅储鏍峰紡', + initval: wrap.searchSize === 'middle' ? '' : wrap.searchSize || '', + required: false, + options: [ + {value: '', label: '榛樿'}, + {value: 'small', label: '灏忛棿璺�'}, + {value: 'updown', label: '涓婁笅鎺掑垪'}, + ], + }, + { + type: 'radio', + field: 'cacheSearch', + label: '鎼滅储缂撳瓨', + initval: wrap.cacheSearch || 'false', + tooltip: '鍚敤鎼滅储鏉′欢缂撳瓨鍚庯紝鍦ㄨ彍鍗曞埛鏂版椂鎼滅储鏉′欢涓嶅彉銆�', + required: false, + options: [ + {value: 'true', label: '鍚敤'}, + {value: 'false', label: '绂佺敤'}, + ], + forbid: !!appType + }, + { + type: 'cascader', + field: 'supModule', + label: '涓婄骇缁勪欢', + initval: wrap.supModule || [], + required: false, + allowClear: true, + options: modules, + forbid: sessionStorage.getItem('editMenuType') === 'popview' }, { type: 'multiselect', -- Gitblit v1.8.0