@ibiz-template/model-helper 0.7.41-alpha.101 → 0.7.41-alpha.103
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-app-menu.d.ts","sourceRoot":"","sources":["../../../src/utils/merge-model/merge-app-menu.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"merge-app-menu.d.ts","sourceRoot":"","sources":["../../../src/utils/merge-model/merge-app-menu.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAkD/D;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,aAAa,EACnB,GAAG,EAAE,aAAa,EAClB,SAAS,GAAE,OAAe,GACzB,IAAI,CAmBN;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,aAAa,GAAG,IAAI,CA2C1E"}
|
|
@@ -16,9 +16,14 @@ function mergeMenuItem(mainItem, subItem, isReverse = false) {
|
|
|
16
16
|
}
|
|
17
17
|
else {
|
|
18
18
|
// 子菜单项也没有下级菜单的时候覆盖(不应合并,场景:主菜单项隐藏,有hidden:true的数据,子菜单项显示,无hidden字段,合并还是会隐藏)
|
|
19
|
-
Object.keys(mainItem).forEach(
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
Object.keys(mainItem).forEach((key) => {
|
|
20
|
+
// 1.合并动态字段场景:如,accessKey,子应用有的话以子应用为准,子应用没有的话,主应用数据为准
|
|
21
|
+
if (key === 'accessKey' && !subItem[key]) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
// 2. 常规场景:以子应用为准即可
|
|
25
|
+
delete mainItem[key];
|
|
26
|
+
});
|
|
22
27
|
Object.assign(mainItem, subItem);
|
|
23
28
|
}
|
|
24
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/model-helper",
|
|
3
|
-
"version": "0.7.41-alpha.
|
|
3
|
+
"version": "0.7.41-alpha.103",
|
|
4
4
|
"description": "模型辅助库",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"types": "out/index.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"ramda": "^0.29.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@ibiz-template/runtime": "^0.7.41-alpha.
|
|
40
|
+
"@ibiz-template/runtime": "^0.7.41-alpha.103",
|
|
41
41
|
"@types/pluralize": "^0.0.33",
|
|
42
42
|
"@types/ramda": "^0.29.10"
|
|
43
43
|
},
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"@ibiz-template/runtime": "^0.6.0",
|
|
46
46
|
"ramda": "^0.29.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "69d11ac5a136c14b996815c2d9d7249bed5345ff"
|
|
49
49
|
}
|