From cea7ef2f8a6b608f31d9ebffdda07c2a336db9c3 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 07 七月 2023 09:24:00 +0800
Subject: [PATCH] 2023-07-07
---
src/menu/components/form/step-form/options.jsx | 69 ++++++++++++++++++++++++++++++++--
1 files changed, 64 insertions(+), 5 deletions(-)
diff --git a/src/menu/components/form/step-form/options.jsx b/src/menu/components/form/step-form/options.jsx
index 403fa82..dae0a31 100644
--- a/src/menu/components/form/step-form/options.jsx
+++ b/src/menu/components/form/step-form/options.jsx
@@ -1,4 +1,3 @@
-import { fromJS } from 'immutable'
import MenuUtils from '@/utils/utils-custom.js'
/**
@@ -20,8 +19,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 = [
{
@@ -55,6 +61,7 @@
{value: 'static', label: '闈欐��'},
],
controlFields: [
+ {field: 'empty', values: ['dynamic']},
{field: 'supModule', values: ['static']},
]
},
@@ -78,8 +85,22 @@
options: [
{value: 'show', label: '鏄剧ず'},
{value: 'hidden', label: '闅愯棌'},
- ]
+ ],
+ // controlFields: [
+ // {field: 'labelSize', values: ['show']},
+ // ]
},
+ // {
+ // type: 'number',
+ // field: 'labelSize',
+ // label: '鍚嶇О澶у皬',
+ // initval: wrap.labelSize || '',
+ // tooltip: '鍒嗙粍鍚嶇О瀛椾綋澶у皬銆�',
+ // min: 12,
+ // max: 50,
+ // precision: 0,
+ // required: false
+ // },
{
type: 'radio',
field: 'tabtype',
@@ -103,6 +124,44 @@
},
{
type: 'radio',
+ field: 'formStyle',
+ label: '琛ㄥ崟鏍峰紡',
+ initval: wrap.formStyle || '',
+ required: false,
+ options: [
+ {value: '', label: '榛樿'},
+ {value: 'shadow', label: '闃村奖'},
+ ],
+ forbid: appType !== 'mob'
+ },
+ {
+ type: 'radio',
+ field: 'goback',
+ label: '绌哄�艰繑鍥�',
+ initval: wrap.goback || 'false',
+ tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岃繑鍥炰笂涓�鐣岄潰銆�',
+ required: false,
+ options: [
+ {value: 'true', label: '鏄�'},
+ {value: 'false', label: '鍚�'},
+ ],
+ forbid: appType !== 'mob'
+ },
+ {
+ type: 'radio',
+ field: 'empty',
+ label: '绌哄�奸殣钘�',
+ initval: wrap.empty || 'show',
+ tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岄殣钘忚缁勪欢銆�',
+ required: false,
+ skip: true,
+ options: [
+ {value: 'show', label: '鍚�'},
+ {value: 'hidden', label: '鏄�'},
+ ],
+ },
+ {
+ type: 'radio',
field: 'permission',
label: '鏉冮檺楠岃瘉',
initval: wrap.permission || 'false',
@@ -111,7 +170,7 @@
{value: 'true', label: '鍚敤'},
{value: 'false', label: '绂佺敤'},
],
- forbid: !appType
+ forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview'
},
{
type: 'cascader',
--
Gitblit v1.8.0