befly-admin 3.13.8 → 3.13.9

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "befly-admin",
3
- "version": "3.13.8",
4
- "gitHead": "3fab09ac346b6d336a2f60b123d4856d077f8c7d",
3
+ "version": "3.13.9",
4
+ "gitHead": "82aaaeee543e9799722ba33c6228bed86df3b425",
5
5
  "private": false,
6
6
  "description": "Befly Admin - 基于 Vue3 + TDesign Vue Next 的后台管理系统",
7
7
  "files": [
@@ -2,27 +2,17 @@ import { Layouts } from "befly-vite";
2
2
  import { createRouter, createWebHashHistory } from "vue-router";
3
3
  import { routes } from "vue-router/auto-routes";
4
4
 
5
- const builtinLayouts = {
6
- default: () => import("befly-admin-ui/layouts/default.vue"),
7
- 1: () => import("befly-admin-ui/layouts/1.vue")
8
- };
9
-
10
- const localLayouts = import.meta.glob("../layouts/*.vue");
11
-
12
5
  // 应用自定义布局系统(同时可选注入根路径重定向)
13
6
  const finalRoutes = Layouts(routes, $Config.homePath, (layoutName) => {
14
- const key = String(layoutName || "default");
15
-
16
- if (Object.hasOwn(builtinLayouts, key)) {
17
- return builtinLayouts[key];
7
+ if (layoutName === "default") {
8
+ return () => import("befly-admin-ui/layouts/default.vue");
18
9
  }
19
10
 
20
- const localKey = `../layouts/${key}.vue`;
21
- if (Object.hasOwn(localLayouts, localKey)) {
22
- return localLayouts[localKey];
11
+ if (layoutName === "1") {
12
+ return () => import("befly-admin-ui/layouts/1.vue");
23
13
  }
24
14
 
25
- return builtinLayouts["1"];
15
+ return () => import(`../layouts/${layoutName}.vue`);
26
16
  });
27
17
 
28
18
  /**