@ibiz-template/model-helper 0.7.41-alpha.28 → 0.7.41-alpha.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js
CHANGED
|
@@ -18751,6 +18751,9 @@ var MergeSubModelHelper = class {
|
|
|
18751
18751
|
* @param {ISubAppRef[]} subAppRefs
|
|
18752
18752
|
*/
|
|
18753
18753
|
mergeAppMainMenu(view, controls, subAppRefs) {
|
|
18754
|
+
if (ibiz.config.common.mergeAppMenu && ibiz.config.common.mergeAppMenu === "disable") {
|
|
18755
|
+
return;
|
|
18756
|
+
}
|
|
18754
18757
|
const dstAppMenu = controls == null ? void 0 : controls.find((item) => {
|
|
18755
18758
|
return item.controlType === "APPMENU" && item.name === "appmenu";
|
|
18756
18759
|
});
|
|
@@ -18758,6 +18761,23 @@ var MergeSubModelHelper = class {
|
|
|
18758
18761
|
for (let i = 0; i < subAppRefs.length; i++) {
|
|
18759
18762
|
const srcAppMenu = subAppRefs[i].appMenuModel;
|
|
18760
18763
|
if (srcAppMenu) {
|
|
18764
|
+
const { userTag } = srcAppMenu;
|
|
18765
|
+
if (userTag) {
|
|
18766
|
+
const [userKey, userValue] = userTag.split(":");
|
|
18767
|
+
if (userKey === "mergemenutag") {
|
|
18768
|
+
try {
|
|
18769
|
+
const userValueReg = new RegExp(userValue);
|
|
18770
|
+
if (!userValueReg.test(dstAppMenu.codeName)) {
|
|
18771
|
+
continue;
|
|
18772
|
+
}
|
|
18773
|
+
} catch (error) {
|
|
18774
|
+
ibiz.log.warn(
|
|
18775
|
+
"[\u83DC\u5355\u5408\u5E76]\uFF1A\u65E0\u6548\u7684\u6B63\u5219\u8868\u8FBE\u5F0F".concat(userValue, ",\u5FFD\u7565\u5904\u7406")
|
|
18776
|
+
);
|
|
18777
|
+
continue;
|
|
18778
|
+
}
|
|
18779
|
+
}
|
|
18780
|
+
}
|
|
18761
18781
|
mergeAppMenu(dstAppMenu, srcAppMenu);
|
|
18762
18782
|
}
|
|
18763
18783
|
}
|
|
@@ -18773,6 +18793,9 @@ var MergeSubModelHelper = class {
|
|
|
18773
18793
|
* @return {*} {void}
|
|
18774
18794
|
*/
|
|
18775
18795
|
mergeSubAppExtendedMenu(view, controls, subAppRefs) {
|
|
18796
|
+
if (ibiz.config.common.mergeAppMenu && ibiz.config.common.mergeAppMenu === "disable") {
|
|
18797
|
+
return;
|
|
18798
|
+
}
|
|
18776
18799
|
if (view.viewType !== "APPINDEXVIEW" || !controls)
|
|
18777
18800
|
return;
|
|
18778
18801
|
const dstAppMenus = controls.filter((item) => {
|