@pubinfo/core 2.0.0-beta.14 → 2.0.0-beta.16
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/{AppSetting-CCvx0lqd.js → AppSetting-jAFvWPf_.js} +16 -16
- package/dist/{HCheckList.vue_vue_type_script_setup_true_lang-BP4YCym4.js → HCheckList.vue_vue_type_script_setup_true_lang-03vNFTY7.js} +2 -2
- package/dist/{PreferencesContent-B2uvCxH7.js → PreferencesContent-BKospVVk.js} +58 -58
- package/dist/{SettingBreadcrumb-CQYovqN-.js → SettingBreadcrumb-B-MGqvCL.js} +2 -2
- package/dist/{SettingCopyright-B3kEXFe1.js → SettingCopyright-DJYD0pRt.js} +1 -1
- package/dist/{SettingEnableTransition-DMI2qjWt.js → SettingEnableTransition-CbigI-kJ.js} +1 -1
- package/dist/{SettingHome-C7dhemZ5.js → SettingHome-srwYPPUa.js} +1 -1
- package/dist/{SettingMenu-DVblMz0x.js → SettingMenu-6cFfXyh6.js} +2 -2
- package/dist/{SettingMode-AiRRWrFq.js → SettingMode-DCVZHznZ.js} +1 -1
- package/dist/{SettingNavSearch-DVda3ppO.js → SettingNavSearch-8SpKAVyw.js} +1 -1
- package/dist/{SettingOther-Zl4WPgxd.js → SettingOther-BcYQ2Ed7.js} +1 -1
- package/dist/{SettingPage-BEqFAFAZ.js → SettingPage-obBObHeU.js} +1 -1
- package/dist/{SettingTabbar-BIQgX8Qq.js → SettingTabbar-BsGbQ-D2.js} +2 -2
- package/dist/{SettingThemes-C5MbD1OJ.js → SettingThemes-m8f3gPn2.js} +2 -2
- package/dist/{SettingToolbar-DkFBagLe.js → SettingToolbar-WmyCi6TX.js} +1 -1
- package/dist/{SettingTopbar-CPGYfMic.js → SettingTopbar-bBmoKC9Z.js} +2 -2
- package/dist/{SettingWidthMode-KUYF9mmX.js → SettingWidthMode-B1OdsVl5.js} +1 -1
- package/dist/{TopThinMode-CWlzIWyR.js → TopThinMode-D4d9RmKt.js} +1 -1
- package/dist/{_...all_-ByL_l69K.js → _...all_-D6gpCuEL.js} +1 -1
- package/dist/{colors-suUdBG0G.js → colors-C5Ze8zIC.js} +1 -1
- package/dist/components/PassStrengthValidator/index.vue.d.ts +2 -2
- package/dist/{index-DavJkyu2.js → index-B-J9tu40.js} +2 -2
- package/dist/{index-BEukdLoy.js → index-B2C38hfC.js} +31 -31
- package/dist/{index-CZl5B_BS.js → index-BP62vA7t.js} +19 -19
- package/dist/{index-CJuwuJt2.js → index-BSzSj0b3.js} +4 -4
- package/dist/{index-Bcos6jMe.js → index-CAoR4_8l.js} +1562 -1561
- package/dist/{index-CfD8orIa.js → index-CMTmyz7f.js} +15 -15
- package/dist/{index-D1T15Wbu.js → index-DQbvPQCH.js} +30 -30
- package/dist/{index-D8HgRilY.js → index-DQlWenum.js} +12 -12
- package/dist/{index-DiFGrnRo.js → index-SGumP-Y7.js} +1 -1
- package/dist/index.js +45 -44
- package/dist/{index.vue_vue_type_style_index_0_scoped_fa1c6ee4_lang-Cux2HLXY.js → index.vue_vue_type_style_index_0_scoped_fa1c6ee4_lang--zsKN-Gh.js} +1 -1
- package/dist/layout/ui-kit/HCheckList.vue.d.ts +2 -2
- package/dist/layout/ui-kit/HTabList.vue.d.ts +2 -2
- package/dist/{menu-Cu11pQEA.js → menu-x8H6Akde.js} +2335 -2337
- package/dist/{pick-DI_ndFGY.js → pick-DMuBL1OS.js} +1 -1
- package/dist/request.js +23 -23
- package/dist/route/index.d.ts +0 -1
- package/dist/route/routes.d.ts +20 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/src/layout/components/Tools/index.vue +1 -0
- package/src/route/index.ts +0 -1
- package/src/route/routes.ts +67 -44
- package/src/stores/modules/route.ts +2 -2
- package/dist/index-DTQQt_XY.js +0 -10
- package/dist/pages/system/index.vue.d.ts +0 -2
- package/dist/route/async.d.ts +0 -9
- package/src/pages/system/index.vue +0 -5
- package/src/route/async.ts +0 -18
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pubinfo/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.16",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"vue": "^3.5.13",
|
|
29
29
|
"vue-i18n": "^10.0.5",
|
|
30
30
|
"vue-router": "^4.5.0",
|
|
31
|
-
"@pubinfo/config": "2.0.0-beta.
|
|
31
|
+
"@pubinfo/config": "2.0.0-beta.16"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@alova/adapter-axios": "^2.0.13",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"vue": "^3.5.13",
|
|
86
86
|
"vue-i18n": "^10.0.5",
|
|
87
87
|
"vue-router": "^4.5.0",
|
|
88
|
-
"@pubinfo/config": "2.0.0-beta.
|
|
88
|
+
"@pubinfo/config": "2.0.0-beta.16"
|
|
89
89
|
},
|
|
90
90
|
"scripts": {
|
|
91
91
|
"dev": "vite build -w -m watch",
|
package/src/route/index.ts
CHANGED
package/src/route/routes.ts
CHANGED
|
@@ -1,9 +1,75 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Route } from '#/vue-router';
|
|
2
2
|
import type { RouteRecordRaw } from 'vue-router';
|
|
3
3
|
import { readProject } from '@/context';
|
|
4
4
|
import { useSettingsStore, useUserStore } from '@/stores';
|
|
5
5
|
import { isUndefined } from 'lodash-es';
|
|
6
6
|
|
|
7
|
+
let asyncRoutes: Route.recordMainRaw[] = [];
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 定义并注册动态路由
|
|
11
|
+
*/
|
|
12
|
+
export function defineAsyncRoutes(routes: Route.recordMainRaw[]) {
|
|
13
|
+
asyncRoutes = [...asyncRoutes, ...routes];
|
|
14
|
+
return routes;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 读取注册的动态路由
|
|
19
|
+
*/
|
|
20
|
+
export function getAsyncRoutes() {
|
|
21
|
+
return asyncRoutes;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const systemRoutes: RouteRecordRaw[] = [
|
|
25
|
+
{
|
|
26
|
+
path: '/',
|
|
27
|
+
component: readProject().layout,
|
|
28
|
+
meta: {
|
|
29
|
+
title: () => useSettingsStore().settings.home.title,
|
|
30
|
+
breadcrumb: false,
|
|
31
|
+
},
|
|
32
|
+
children: [
|
|
33
|
+
{
|
|
34
|
+
path: 'reload',
|
|
35
|
+
name: 'Reload',
|
|
36
|
+
component: () => import('@/pages/system/reload.vue'),
|
|
37
|
+
meta: {
|
|
38
|
+
title: '重新加载',
|
|
39
|
+
breadcrumb: false,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
path: 'personal/profile',
|
|
44
|
+
name: 'Profile',
|
|
45
|
+
component: () => import('@/pages/personal/profile/index.vue'),
|
|
46
|
+
meta: {
|
|
47
|
+
title: '个人中心',
|
|
48
|
+
i18n: 'route.personal.profile',
|
|
49
|
+
icon: 'i-iconamoon-profile-duotone',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 定义并注册系统路由(含Layout)
|
|
58
|
+
*/
|
|
59
|
+
export function defineSystemRoutes(routes: RouteRecordRaw[]) {
|
|
60
|
+
systemRoutes[0].children = [...(systemRoutes?.[0]?.children ?? []), ...routes];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* 读取注册的系统路由
|
|
65
|
+
*/
|
|
66
|
+
export function getSystemRoutes() {
|
|
67
|
+
return systemRoutes;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 内置静态路由
|
|
72
|
+
*/
|
|
7
73
|
export const constantRoutes: RouteRecordRaw[] = [
|
|
8
74
|
{
|
|
9
75
|
path: '/change-password/:changePassWordToken',
|
|
@@ -56,46 +122,3 @@ export const constantRoutes: RouteRecordRaw[] = [
|
|
|
56
122
|
},
|
|
57
123
|
},
|
|
58
124
|
];
|
|
59
|
-
|
|
60
|
-
export const systemRoutes: RouteRecordRaw[] = [
|
|
61
|
-
{
|
|
62
|
-
path: '/',
|
|
63
|
-
component: readProject().layout,
|
|
64
|
-
meta: {
|
|
65
|
-
title: () => useSettingsStore().settings.home.title,
|
|
66
|
-
breadcrumb: false,
|
|
67
|
-
},
|
|
68
|
-
children: [
|
|
69
|
-
{
|
|
70
|
-
path: '',
|
|
71
|
-
name: 'Home',
|
|
72
|
-
component: () => import('@/pages/system/index.vue'),
|
|
73
|
-
meta: {
|
|
74
|
-
title: () => useSettingsStore().settings.home.title,
|
|
75
|
-
i18n: 'route.home',
|
|
76
|
-
icon: 'i-ant-design:home-twotone',
|
|
77
|
-
breadcrumb: false,
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
path: 'reload',
|
|
82
|
-
name: 'Reload',
|
|
83
|
-
component: () => import('@/pages/system/reload.vue'),
|
|
84
|
-
meta: {
|
|
85
|
-
title: '重新加载',
|
|
86
|
-
breadcrumb: false,
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
path: 'personal/profile',
|
|
91
|
-
name: 'Profile',
|
|
92
|
-
component: () => import('@/pages/personal/profile/index.vue'),
|
|
93
|
-
meta: {
|
|
94
|
-
title: '个人中心',
|
|
95
|
-
i18n: 'route.personal.profile',
|
|
96
|
-
icon: 'i-iconamoon-profile-duotone',
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
|
-
},
|
|
101
|
-
];
|
|
@@ -3,8 +3,7 @@ import type { RouteMeta, RouteRecordRaw } from 'vue-router';
|
|
|
3
3
|
|
|
4
4
|
import { GetApiRouteList } from '@/api/system/app';
|
|
5
5
|
import { readProject } from '@/context';
|
|
6
|
-
import { getAsyncRoutes } from '@/route';
|
|
7
|
-
import { systemRoutes } from '@/route/routes';
|
|
6
|
+
import { getAsyncRoutes, getSystemRoutes } from '@/route';
|
|
8
7
|
import { resolveRoutePath } from '@/utils';
|
|
9
8
|
import { cloneDeep, defaultTo, get, has, isArray, isString, isUndefined, merge, omit } from 'lodash-es';
|
|
10
9
|
import { defineStore } from 'pinia';
|
|
@@ -190,6 +189,7 @@ const useRouteStore = defineStore(
|
|
|
190
189
|
* @returns {Array<RouteRecordRaw>} 扁平化的系统路由。
|
|
191
190
|
*/
|
|
192
191
|
const flatSystemRoutes = computed(() => {
|
|
192
|
+
const systemRoutes = getSystemRoutes();
|
|
193
193
|
const routes = [...systemRoutes];
|
|
194
194
|
routes.forEach(item => flattenSystemRoutes(item));
|
|
195
195
|
return routes;
|
package/dist/index-DTQQt_XY.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { createElementBlock as e, openBlock as o } from "vue";
|
|
2
|
-
import { _ as c } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
-
const t = {}, r = { class: "home" };
|
|
4
|
-
function n(s, _) {
|
|
5
|
-
return o(), e("div", r, " 主页 ");
|
|
6
|
-
}
|
|
7
|
-
const i = /* @__PURE__ */ c(t, [["render", n]]);
|
|
8
|
-
export {
|
|
9
|
-
i as default
|
|
10
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
-
export default _default;
|
package/dist/route/async.d.ts
DELETED
package/src/route/async.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Route } from '#/vue-router';
|
|
2
|
-
|
|
3
|
-
let asyncRoutes: Route.recordMainRaw[] = [];
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 定义并注册动态路由
|
|
7
|
-
*/
|
|
8
|
-
export function defineAsyncRoutes(routes: Route.recordMainRaw[]) {
|
|
9
|
-
asyncRoutes = [...asyncRoutes, ...routes];
|
|
10
|
-
return routes;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* 读取注册的动态路由
|
|
15
|
-
*/
|
|
16
|
-
export function getAsyncRoutes() {
|
|
17
|
-
return asyncRoutes;
|
|
18
|
-
}
|