From f05ce61d55d421926229e50136c3b18c0dd9c262 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 18 十一月 2022 15:04:54 +0800 Subject: [PATCH] 2022-11-18 --- src/menu/components/form/simple-form/options.jsx | 26 ++++++++++++++++++++++---- 1 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/menu/components/form/simple-form/options.jsx b/src/menu/components/form/simple-form/options.jsx index 4d87e6f..e0936b9 100644 --- a/src/menu/components/form/simple-form/options.jsx +++ b/src/menu/components/form/simple-form/options.jsx @@ -1,4 +1,3 @@ -import { fromJS } from 'immutable' import MenuUtils from '@/utils/utils-custom.js' /** @@ -36,8 +35,15 @@ } let modules = [] - let menu = fromJS(window.GLOB.customMenu).toJS() - modules = MenuUtils.getSupModules(menu.components, config.uuid) + let menu = window.GLOB.customMenu + modules = MenuUtils.getSupModules(menu.components, config.uuid, menu.interfaces) + + if (wrap.supModule && wrap.supModule.length > 0 && wrap.supModule[0] !== 'empty') { + let has = MenuUtils.checkSupModules(modules, wrap.supModule.slice(-1)[0]) + if (!has) { + wrap.supModule = '' + } + } const wrapForm = [ { @@ -129,7 +135,7 @@ }, { type: 'radio', - field: 'subEnable', + field: 'enable', label: '鎻愪氦', initval: wrap.enable || 'true', required: false, @@ -140,6 +146,18 @@ }, { type: 'radio', + field: 'closeEnable', + label: '鍏抽棴', + initval: wrap.closeEnable || 'false', + tooltip: '绠$悊绯荤粺涓細鍏抽棴褰撳墠鏍囩锛屽瓙搴旂敤涓负杩斿洖涓婁竴椤点��', + required: false, + options: [ + {value: 'true', label: '鏄剧ず'}, + {value: 'false', label: '闅愯棌'}, + ] + }, + { + type: 'radio', field: 'goback', label: '绌哄�艰繑鍥�', initval: wrap.goback || 'false', -- Gitblit v1.8.0