@duxweb/dvha-core 1.1.26 → 1.1.28

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
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue-router");function i(e){const r=[...e.routes||[],{name:"default",path:"/:catchAll(.*)",redirect:`/${e.defaultManage||e.manages?.[0]?.name||""}`}];return e.manages?.forEach(t=>{const a=t.routes?.filter(o=>o.meta?.authorization===!0||o.meta?.authorization===void 0)||[],n=t.routes?.filter(o=>o.meta?.authorization===!1)||[];r.push({name:t.name,path:t.routePrefix||"",children:[{path:"",name:`${t.name}.auth`,component:t.components?.authLayout,children:a},{path:"",name:`${t.name}.noAuth`,component:t.components?.noAuthLayout,children:n}],meta:{manageName:t.name}})}),u.createRouter({history:u.createWebHashHistory(),routes:r})}exports.initRouter=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue-router");function h(e){const a=[...e.routes||[],{name:"default",path:"/:catchAll(.*)",redirect:`/${e.defaultManage||e.manages?.[0]?.name||""}`}];return e.manages?.forEach(t=>{const r=t.routes?.filter(o=>o.meta?.authorization===!0||o.meta?.authorization===void 0)||[],u=t.routes?.filter(o=>o.meta?.authorization===!1)||[];a.push({name:t.name,path:t.routePrefix||"",children:[{path:"",name:`${t.name}.auth`,component:t.components?.authLayout,children:r},{path:"",name:`${t.name}.noAuth`,component:t.components?.noAuthLayout,children:u},{path:":pathMatch(.*)*",name:`${t.name}.placeholder`,component:t.components?.authLayout,children:[]}],meta:{manageName:t.name}})}),n.createRouter({history:n.createWebHashHistory(),routes:a})}exports.initRouter=h;
@@ -1,5 +1,5 @@
1
- import { createRouter as u, createWebHashHistory as h } from "vue-router";
2
- function i(e) {
1
+ import { createRouter as h, createWebHashHistory as u } from "vue-router";
2
+ function s(e) {
3
3
  const a = [
4
4
  ...e.routes || [],
5
5
  {
@@ -9,7 +9,7 @@ function i(e) {
9
9
  }
10
10
  ];
11
11
  return e.manages?.forEach((t) => {
12
- const r = t.routes?.filter((o) => o.meta?.authorization === !0 || o.meta?.authorization === void 0) || [], n = t.routes?.filter((o) => o.meta?.authorization === !1) || [];
12
+ const n = t.routes?.filter((o) => o.meta?.authorization === !0 || o.meta?.authorization === void 0) || [], r = t.routes?.filter((o) => o.meta?.authorization === !1) || [];
13
13
  a.push({
14
14
  name: t.name,
15
15
  path: t.routePrefix || "",
@@ -18,24 +18,30 @@ function i(e) {
18
18
  path: "",
19
19
  name: `${t.name}.auth`,
20
20
  component: t.components?.authLayout,
21
- children: r
21
+ children: n
22
22
  },
23
23
  {
24
24
  path: "",
25
25
  name: `${t.name}.noAuth`,
26
26
  component: t.components?.noAuthLayout,
27
- children: n
27
+ children: r
28
+ },
29
+ {
30
+ path: ":pathMatch(.*)*",
31
+ name: `${t.name}.placeholder`,
32
+ component: t.components?.authLayout,
33
+ children: []
28
34
  }
29
35
  ],
30
36
  meta: {
31
37
  manageName: t.name
32
38
  }
33
39
  });
34
- }), u({
35
- history: h(),
40
+ }), h({
41
+ history: u(),
36
42
  routes: a
37
43
  });
38
44
  }
39
45
  export {
40
- i as initRouter
46
+ s as initRouter
41
47
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@duxweb/dvha-core",
3
3
  "type": "module",
4
- "version": "1.1.26",
4
+ "version": "1.1.28",
5
5
  "author": "DuxWeb",
6
6
  "license": "MIT",
7
7
  "repository": {