From 3d4bc79a80eb9cff0f8ef7c53f9685c9ff9fbd2d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 02 九月 2021 23:17:36 +0800 Subject: [PATCH] 2021-09-02 --- src/menu/components/card/cardsimplecomponent/options.jsx | 23 ++++++----------------- 1 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/menu/components/card/cardsimplecomponent/options.jsx b/src/menu/components/card/cardsimplecomponent/options.jsx index c9affe0..3337cc2 100644 --- a/src/menu/components/card/cardsimplecomponent/options.jsx +++ b/src/menu/components/card/cardsimplecomponent/options.jsx @@ -70,7 +70,7 @@ if (appmenulist) { try { appmenulist = JSON.parse(appmenulist) - } catch { + } catch (e) { appmenulist = [] } } else { @@ -81,7 +81,7 @@ if (menulist) { try { menulist = JSON.parse(menulist) - } catch { + } catch (e) { menulist = [] } } else { @@ -95,7 +95,7 @@ field: 'primaryId', label: '涓婚敭鍊�', initval: setting.primaryId || '', - tooltip: '鍗$墖鐐瑰嚮鏃讹紝鍚戝叾浠栫粍浠朵紶閫掔殑ID鍊笺��', + tooltip: '璁剧疆涓�涓睘鎬у崱闈欐�両D锛屽悜鍏朵粬缁勪欢浼犻�掔殑鎸囧畾闈欐�両D鍊�', required: false, forbid: !hasPrimaryKey }, @@ -112,29 +112,18 @@ ], controlFields: [ {field: 'menu', values: ['menu']}, - {field: 'appmenu', values: ['menu']}, {field: 'linkurl', values: ['link']}, {field: 'open', values: ['menu', 'link']}, {field: 'joint', values: ['menu', 'link']}, ] }, { - type: 'cascader', + type: appType ? 'select' : 'cascader', field: 'menu', - label: '鑿滃崟', - initval: setting.menu || [], - required: true, - options: menulist, - forbid: !!appType - }, - { - type: 'select', - field: 'appmenu', label: '鍏宠仈鑿滃崟', - initval: setting.menu || '', + initval: setting.menu || (appType ? '' : []), required: true, - options: appmenulist, - forbid: !appType + options: appType ? appmenulist : menulist, }, { type: 'textarea', -- Gitblit v1.8.0