@airpower/web 1.10.3 → 1.10.5

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.
Files changed (2) hide show
  1. package/dist/main.js +7 -6
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -19317,6 +19317,10 @@ class RouterUtil {
19317
19317
  */
19318
19318
  static addRouterAsync(menuList, parentRouter) {
19319
19319
  menuList.forEach((item) => {
19320
+ if (item.children && item.children.length > 0) {
19321
+ this.addRouterAsync(item.children, parentRouter);
19322
+ return;
19323
+ }
19320
19324
  if (!this.router) {
19321
19325
  FeedbackUtil.toastError("请先调用 createRouter 创建路由");
19322
19326
  return;
@@ -19334,13 +19338,10 @@ class RouterUtil {
19334
19338
  meta: {
19335
19339
  name: item.name
19336
19340
  },
19337
- redirect: item.children && item.children.length > 0 ? item.children[0].path.toString() : void 0,
19338
- component: this.components[`${this.componentsDirectory}${item.component || item.path}.vue`],
19339
- children: []
19341
+ redirect: item.children && item.children.length > 0 ? item.children[0].path : void 0,
19342
+ children: [],
19343
+ component: this.components[`${this.componentsDirectory}${item.component || item.path}.vue`]
19340
19344
  });
19341
- if (item.children && item.children.length > 0) {
19342
- this.addRouterAsync(item.children, parentRouter);
19343
- }
19344
19345
  });
19345
19346
  }
19346
19347
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@airpower/web",
3
3
  "type": "module",
4
- "version": "1.10.3",
4
+ "version": "1.10.5",
5
5
  "description": "AirPower-Web",
6
6
  "author": {
7
7
  "name": "Hamm",