From c39fc1db18c6d754312ccbc187f11076c203392b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 22 十二月 2023 17:59:47 +0800 Subject: [PATCH] 2023-12-22 --- src/utils/utils-custom.js | 38 +++++++++++++++++++++++++++++++++++--- 1 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js index 0c2939d..8f7fa33 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, interfaces) { 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 => { @@ -83,6 +94,15 @@ } } }) + + if (interfaces && interfaces.length > 0) { + interfaces.forEach(item => { + modules.push({ + value: item.uuid, + label: item.name + }) + }) + } return modules } @@ -672,11 +692,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