From 169f6cd29a0d3add4fe2cf35c3579b45fa83c0d4 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 14 十一月 2023 00:02:45 +0800 Subject: [PATCH] 2023-11-14 --- src/utils/utils-custom.js | 31 +++++++++++++++++++++++++++---- 1 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js index 0c2939d..44a9750 100644 --- a/src/utils/utils-custom.js +++ b/src/utils/utils-custom.js @@ -6,7 +6,7 @@ * @description 鑾峰彇涓嬬骇妯″潡 * @return {String} selfId 褰撳墠缁勪欢id */ - static getSubModules (components, selfId, supId) { + static getSubModules (components, selfId, supId, has) { let modules = [] components.forEach(item => { if (item.uuid === selfId || item.type === 'navbar') { @@ -17,6 +17,17 @@ label: item.name, disabled: supId === item.uuid }) + + if (item.type === 'form' && item.subtype === 'simpleform' && item.wrap.refocus && supId !== item.uuid) { + modules.push({ + value: item.uuid + '$focus-refresh', + label: item.name + '锛堝埛鏂�-鑱氱劍锛�', + }) + modules.push({ + value: item.uuid + '$focus-nofresh', + label: item.name + '锛堜笉鍒锋柊-鑱氱劍锛�', + }) + } } else if (item.type === 'tabs') { if (item.subtype === 'tabletabs') { item.subtabs.forEach(tab => { @@ -38,7 +49,7 @@ type: 'tab', value: f_tab.uuid, label: f_tab.label, - children: this.getSubModules(f_tab.components, selfId, supId) + children: this.getSubModules(f_tab.components, selfId, supId, has) } if (subItem.children.length === 0) { @@ -672,11 +683,23 @@ } if (btn.syncComponent && btn.syncComponent[0] === 'multiComponent' && btn.syncComponents) { btn.syncComponents = btn.syncComponents.map(m => { - m.syncComId = m.syncComId.map(n => md5(commonId + n)) + m.syncComId = m.syncComId.map(n => { + if (/\$focus/.test(n)) { + return md5(commonId + n.split('$')[0]) + '$' + n.split('$')[1] + } + + return md5(commonId + n) + }) return m }) } else if (btn.syncComponent && btn.syncComponent.length > 0) { - btn.syncComponent = btn.syncComponent.map(m => md5(commonId + m)) + btn.syncComponent = btn.syncComponent.map(m => { + if (/\$focus/.test(m)) { + return md5(commonId + m.split('$')[0]) + '$' + m.split('$')[1] + } + + return md5(commonId + m) + }) } } -- Gitblit v1.8.0