@done-coding/admin-core 0.3.0 → 0.4.0
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/es/bridge/index.mjs +87 -47
- package/es/components/app-layout/AppBody.vue.mjs +7 -0
- package/es/components/app-layout/AppBody.vue2.mjs +89 -0
- package/es/components/app-layout/AppBreadcrumb.vue.mjs +7 -0
- package/es/components/app-layout/AppBreadcrumb.vue2.mjs +58 -0
- package/es/components/app-layout/AppFooter.vue.mjs +7 -0
- package/es/components/app-layout/AppFooter.vue2.mjs +17 -0
- package/es/components/app-layout/AppHeader.vue.mjs +7 -0
- package/es/components/app-layout/AppHeader.vue2.mjs +99 -0
- package/es/components/app-layout/AppLayout.vue.mjs +7 -0
- package/es/components/app-layout/AppLayout.vue2.mjs +130 -0
- package/es/components/app-layout/AppPage.vue.mjs +7 -0
- package/es/components/app-layout/AppPage.vue2.mjs +39 -0
- package/es/components/app-layout/AppSidebar.vue.mjs +7 -0
- package/es/components/app-layout/AppSidebar.vue2.mjs +97 -0
- package/es/components/app-layout/index.mjs +32 -0
- package/es/components/display/ActionBtnGroup.vue.mjs +61 -0
- package/es/components/display/ActionBtnGroup.vue2.mjs +4 -0
- package/es/components/display/HeightProvider.vue.mjs +26 -26
- package/es/components/display/TabsHeader.vue.mjs +7 -0
- package/es/components/display/TabsHeader.vue2.mjs +76 -0
- package/es/components/display/TabsMain.vue.mjs +100 -5
- package/es/components/display/TabsMain.vue2.mjs +2 -95
- package/es/components/display/TabsNaturalFlow.vue.mjs +17 -0
- package/es/components/display/TabsNaturalFlow.vue2.mjs +4 -0
- package/es/components/display/TabsRefineFlow.vue.mjs +62 -0
- package/es/components/display/TabsRefineFlow.vue2.mjs +4 -0
- package/es/components/display/index.mjs +10 -8
- package/es/components/form/FormSearch.vue.mjs +2 -2
- package/es/components/form/FormSearch.vue2.mjs +107 -63
- package/es/components/form/form-search-utils.mjs +25 -0
- package/es/components/list-page/ListPage.vue.mjs +2 -2
- package/es/components/list-page/ListPage.vue2.mjs +82 -76
- package/es/components/misc/ActionBtn.vue.mjs +84 -65
- package/es/components/misc/ActionConfirm.vue.mjs +1 -1
- package/es/components/misc/ActionConfirm.vue2.mjs +77 -71
- package/es/components/misc/SelectModule.vue.mjs +55 -0
- package/es/components/misc/SelectModule.vue2.mjs +4 -0
- package/es/components/modal/ConfirmModal.vue.mjs +1 -1
- package/es/components/modal/ConfirmModal.vue2.mjs +13 -12
- package/es/components/modal/modal-shelf-hierarchy.mjs +4 -6
- package/es/components/table/TableMain.vue.mjs +3 -3
- package/es/components/table/TableMain.vue2.mjs +103 -102
- package/es/components/table/ToolbarButtons.vue.mjs +10 -40
- package/es/hooks/use-breakpoint.mjs +40 -0
- package/es/hooks/use-channel-viewport-height.mjs +18 -0
- package/es/index.mjs +165 -128
- package/es/inject/key.mjs +18 -8
- package/es/router/guard/index.mjs +31 -0
- package/es/router/guard/login.mjs +4 -0
- package/es/router/guard/permission.mjs +4 -0
- package/es/store/app.mjs +103 -0
- package/es/store/router-permission.mjs +65 -0
- package/es/store/user.mjs +52 -52
- package/es/style.css +1 -1
- package/package.json +3 -2
- package/types/bridge/index.d.ts +193 -89
- package/types/components/app-layout/AppBody.vue.d.ts +45 -0
- package/types/components/app-layout/AppBreadcrumb.vue.d.ts +25 -0
- package/types/components/app-layout/AppFooter.vue.d.ts +2 -0
- package/types/components/app-layout/AppHeader.vue.d.ts +55 -0
- package/types/components/app-layout/AppLayout.vue.d.ts +76 -0
- package/types/components/app-layout/AppPage.vue.d.ts +54 -0
- package/types/components/app-layout/AppSidebar.vue.d.ts +51 -0
- package/types/components/app-layout/index.d.ts +27 -0
- package/types/components/app-layout/types.d.ts +43 -0
- package/types/components/display/ActionBtnGroup.vue.d.ts +16 -0
- package/types/components/display/HeightProvider.vue.d.ts +10 -6
- package/types/components/display/TabsHeader.vue.d.ts +42 -0
- package/types/components/display/TabsMain.vue.d.ts +49 -7
- package/types/components/display/TabsNaturalFlow.vue.d.ts +16 -0
- package/types/components/display/TabsRefineFlow.vue.d.ts +53 -0
- package/types/components/display/index.d.ts +16 -13
- package/types/components/display/types.d.ts +85 -29
- package/types/components/form/form-search-utils.d.ts +24 -0
- package/types/components/form/types.d.ts +7 -1
- package/types/components/list-page/types.d.ts +1 -1
- package/types/components/misc/ActionBtn.vue.d.ts +17 -23
- package/types/components/misc/ActionConfirm.vue.d.ts +56 -27
- package/types/components/misc/SelectModule.vue.d.ts +2 -0
- package/types/components/misc/index.d.ts +11 -1
- package/types/components/misc/types.d.ts +35 -26
- package/types/components/modal/ConfirmModal.vue.d.ts +17 -0
- package/types/components/modal/modal-shelf-hierarchy.d.ts +1 -1
- package/types/components/table/types.d.ts +14 -12
- package/types/helpers/index.d.ts +10 -3
- package/types/hooks/index.d.ts +2 -0
- package/types/hooks/use-breakpoint.d.ts +4 -0
- package/types/hooks/use-channel-viewport-height.d.ts +28 -0
- package/types/index.d.ts +4 -1
- package/types/inject/key.d.ts +35 -10
- package/types/router/guard/index.d.ts +21 -0
- package/types/router/guard/login.d.ts +5 -0
- package/types/router/guard/permission.d.ts +5 -0
- package/types/router/guard/types.d.ts +15 -0
- package/types/router/index.d.ts +1 -0
- package/types/store/app.d.ts +149 -0
- package/types/store/index.d.ts +2 -0
- package/types/store/router-permission.d.ts +80 -0
- package/types/store/user.d.ts +11 -9
- /package/es/{helpers → bridge}/route.mjs +0 -0
- /package/es/{helpers → bridge}/state.mjs +0 -0
- /package/es/{helpers → bridge}/storage.mjs +0 -0
- /package/types/{helpers → bridge}/route.d.ts +0 -0
- /package/types/{helpers → bridge}/state.d.ts +0 -0
- /package/types/{helpers → bridge}/storage.d.ts +0 -0
package/es/index.mjs
CHANGED
|
@@ -2,144 +2,181 @@ import { formInstall as t } from "./components/form/index.mjs";
|
|
|
2
2
|
import { menuInstall as o } from "./components/menu/index.mjs";
|
|
3
3
|
import { displayInstall as r } from "./components/display/index.mjs";
|
|
4
4
|
import { miscInstall as a } from "./components/misc/index.mjs";
|
|
5
|
-
import { modalInstall as
|
|
6
|
-
import { tableInstall as
|
|
5
|
+
import { modalInstall as f } from "./components/modal/index.mjs";
|
|
6
|
+
import { tableInstall as m } from "./components/table/index.mjs";
|
|
7
7
|
import { listPageInstall as s } from "./components/list-page/index.mjs";
|
|
8
8
|
import { panelInstall as l } from "./components/panel/index.mjs";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { default as T } from "./components/misc/
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as h } from "./components/
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as K } from "./components/
|
|
21
|
-
import { default as k } from "./components/
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as j } from "./components/
|
|
24
|
-
import { default as q } from "./components/
|
|
25
|
-
import { default as Z } from "./components/
|
|
26
|
-
import { default as ee } from "./components/
|
|
27
|
-
import { default as oe } from "./components/
|
|
28
|
-
import { default as ae } from "./components/
|
|
29
|
-
import {
|
|
30
|
-
import { default as le } from "./components/
|
|
31
|
-
import { default as
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as
|
|
41
|
-
import {
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
|
|
9
|
+
import { appLayoutInstall as p } from "./components/app-layout/index.mjs";
|
|
10
|
+
import { createAdminBridge as g } from "./bridge/index.mjs";
|
|
11
|
+
import { default as T } from "./components/misc/ActionBtn.vue.mjs";
|
|
12
|
+
import { default as R } from "./components/display/ActionBtnGroup.vue.mjs";
|
|
13
|
+
import { default as O } from "./components/misc/ActionButton.vue.mjs";
|
|
14
|
+
import { default as h } from "./components/misc/ActionButtonDanger.vue.mjs";
|
|
15
|
+
import { default as y } from "./components/misc/ActionButtonWarn.vue.mjs";
|
|
16
|
+
import { default as U } from "./components/modal/DetailModal.vue.mjs";
|
|
17
|
+
import { default as G } from "./components/form/FormMain.vue.mjs";
|
|
18
|
+
import { default as N } from "./components/form/FormRadioGroup.vue.mjs";
|
|
19
|
+
import { default as Y } from "./components/form/FormSelect.vue.mjs";
|
|
20
|
+
import { default as K } from "./components/form/FormTree.vue.mjs";
|
|
21
|
+
import { default as k } from "./components/form/FormVerifyCode.vue.mjs";
|
|
22
|
+
import { default as z } from "./components/display/HeightProvider.vue.mjs";
|
|
23
|
+
import { default as j } from "./components/menu/MenuItemSub.vue.mjs";
|
|
24
|
+
import { default as q } from "./components/menu/MenuTree.vue.mjs";
|
|
25
|
+
import { default as Z } from "./components/modal/ModalPorter.vue.mjs";
|
|
26
|
+
import { default as ee } from "./components/modal/ModalShelf.vue.mjs";
|
|
27
|
+
import { default as oe } from "./components/panel/PanelItem.vue.mjs";
|
|
28
|
+
import { default as ae } from "./components/panel/PanelMain.vue.mjs";
|
|
29
|
+
import { default as me } from "./components/misc/SelectModule.vue.mjs";
|
|
30
|
+
import { default as le } from "./components/display/TabsMain.vue.mjs";
|
|
31
|
+
import { default as ue } from "./components/misc/TriggerAutoImport.vue.mjs";
|
|
32
|
+
import { default as ne } from "./components/display/WatchSize.vue.mjs";
|
|
33
|
+
import { APP_API_LIST_MODEL_KEY_CONFIG as de } from "./config/list-model.mjs";
|
|
34
|
+
import { APP_LAYOUT_APP_STORE_KEY as Ae, APP_LAYOUT_BRIDGE_KEY as _e, APP_LAYOUT_USER_STORE_KEY as Ee, BODY_CONTENT_VIEWPORT_HEIGHT as Ie, TABS_MAIN_VISUAL_LEVEL as Pe, getModalShelfInjectionKey as Se } from "./inject/key.mjs";
|
|
35
|
+
import { default as Me } from "./components/misc/ActionConfirm.vue.mjs";
|
|
36
|
+
import { default as Le } from "./components/app-layout/AppBody.vue.mjs";
|
|
37
|
+
import { default as Ce } from "./components/app-layout/AppBreadcrumb.vue.mjs";
|
|
38
|
+
import { default as Fe } from "./components/app-layout/AppFooter.vue.mjs";
|
|
39
|
+
import { default as De } from "./components/app-layout/AppHeader.vue.mjs";
|
|
40
|
+
import { default as Be } from "./components/app-layout/AppLayout.vue.mjs";
|
|
41
|
+
import { default as be } from "./components/app-layout/AppPage.vue.mjs";
|
|
42
|
+
import { default as Ve } from "./components/app-layout/AppSidebar.vue.mjs";
|
|
43
|
+
import { default as we } from "./components/misc/AutoRefresh.vue.mjs";
|
|
44
|
+
import { default as ve } from "./components/modal/ConfirmModal.vue.mjs";
|
|
45
|
+
import { EXPORT_MAX_LIMIT as He, OPERATE_COLUMN_PROP as ke, exportCSV as We, pickExportColumns as ze } from "./utils/export.mjs";
|
|
46
|
+
import { FORM_CONFIG_SELECT_ALL_VALUE as je, getConfirmPasswordRule as Qe, passwordRule as qe, setFormComponentType as Je } from "./helpers/form.mjs";
|
|
47
|
+
import { FORM_ITEM_CHANGE_LOADING as $e, generateFormData as et, getBlurSubmit as tt, getChangeSubmit as ot, getDatePickerShortcuts as rt, getEnterSubmit as at, getPlaceholder as ft, getVModelSugar as mt, parseFormData as st, resolveFormLayout as lt, setInputComponent as pt, setSelectComponent as ut, stringifyFormData as it, swiftFormItemConfig as nt } from "./components/form/utils.mjs";
|
|
48
|
+
import { default as dt } from "./components/form/FormSearch.vue.mjs";
|
|
49
|
+
import { default as At } from "./components/form/FormVerifyImage.vue.mjs";
|
|
50
|
+
import { default as Et } from "./components/list-page/ListPage.vue.mjs";
|
|
51
|
+
import { default as Pt } from "./components/panel/PanelEditSwitch.vue.mjs";
|
|
52
|
+
import { ROUTE_MODULE_LEVEL as gt, TabsMainReplaceQueryKey as Mt } from "./config/route.mjs";
|
|
53
|
+
import { default as Lt } from "./components/table/TableMain.vue.mjs";
|
|
54
|
+
import { checkLogin as Ct } from "./router/guard/login.mjs";
|
|
55
|
+
import { checkPermission as Ft } from "./router/guard/permission.mjs";
|
|
56
|
+
import { countAll as Dt, createListApi as yt, fetchListAll as Bt } from "./helpers/list-helper.mjs";
|
|
57
|
+
import { createAppStore as bt } from "./store/app.mjs";
|
|
58
|
+
import { createGenerateRouteMetaRawTree as Vt } from "./bridge/route.mjs";
|
|
59
|
+
import { createGuard as wt } from "./router/guard/index.mjs";
|
|
60
|
+
import { createRoutePermissionStore as vt } from "./store/router-permission.mjs";
|
|
61
|
+
import { createStorageWithNamespace as Ht } from "./bridge/storage.mjs";
|
|
62
|
+
import { createUseState as Wt } from "./bridge/state.mjs";
|
|
63
|
+
import { createUserStore as Xt } from "./store/user.mjs";
|
|
64
|
+
import { flatRouteMetaResolveRaw as Qt, getRoutePermissionKey as qt } from "./utils/router.mjs";
|
|
65
|
+
import { getId as Zt } from "./utils/id.mjs";
|
|
66
|
+
import { timeCountDown as eo } from "./utils/time.mjs";
|
|
67
|
+
import { useActivated as oo, useActivatedEvent as ro, useActivatedExec as ao } from "./hooks/activated.mjs";
|
|
68
|
+
import { useBreakpoint as mo } from "./hooks/use-breakpoint.mjs";
|
|
69
|
+
import { useChannelViewportHeight as lo } from "./hooks/use-channel-viewport-height.mjs";
|
|
70
|
+
import { useFeelSize as uo } from "./hooks/feel-size.mjs";
|
|
71
|
+
import { useMenusDataDispatch as no } from "./hooks/menus-dispatch.mjs";
|
|
72
|
+
import { useTimeout as co } from "./hooks/timeout.mjs";
|
|
73
|
+
const I = {
|
|
57
74
|
install(e) {
|
|
58
|
-
e.use(t), e.use(o), e.use(r), e.use(a), e.use(
|
|
75
|
+
e.use(t), e.use(o), e.use(r), e.use(a), e.use(f), e.use(m), e.use(s), e.use(l), e.use(p);
|
|
59
76
|
}
|
|
60
77
|
};
|
|
61
78
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
79
|
+
de as APP_API_LIST_MODEL_KEY_CONFIG,
|
|
80
|
+
Ae as APP_LAYOUT_APP_STORE_KEY,
|
|
81
|
+
_e as APP_LAYOUT_BRIDGE_KEY,
|
|
82
|
+
Ee as APP_LAYOUT_USER_STORE_KEY,
|
|
83
|
+
T as ActionBtn,
|
|
84
|
+
R as ActionBtnGroup,
|
|
85
|
+
O as ActionButton,
|
|
86
|
+
h as ActionButtonDanger,
|
|
87
|
+
y as ActionButtonWarn,
|
|
88
|
+
Me as ActionConfirm,
|
|
89
|
+
Le as AppBody,
|
|
90
|
+
Ce as AppBreadcrumb,
|
|
91
|
+
Fe as AppFooter,
|
|
92
|
+
De as AppHeader,
|
|
93
|
+
Be as AppLayout,
|
|
94
|
+
be as AppPage,
|
|
95
|
+
Ve as AppSidebar,
|
|
96
|
+
we as AutoRefresh,
|
|
97
|
+
Ie as BODY_CONTENT_VIEWPORT_HEIGHT,
|
|
98
|
+
ve as ConfirmModal,
|
|
99
|
+
U as DetailModal,
|
|
100
|
+
He as EXPORT_MAX_LIMIT,
|
|
101
|
+
je as FORM_CONFIG_SELECT_ALL_VALUE,
|
|
102
|
+
$e as FORM_ITEM_CHANGE_LOADING,
|
|
103
|
+
G as FormMain,
|
|
104
|
+
N as FormRadioGroup,
|
|
105
|
+
dt as FormSearch,
|
|
106
|
+
Y as FormSelect,
|
|
107
|
+
K as FormTree,
|
|
108
|
+
k as FormVerifyCode,
|
|
109
|
+
At as FormVerifyImage,
|
|
110
|
+
z as HeightProvider,
|
|
111
|
+
Et as ListPage,
|
|
112
|
+
j as MenuItemSub,
|
|
113
|
+
q as MenuTree,
|
|
114
|
+
Z as ModalPorter,
|
|
115
|
+
ee as ModalShelf,
|
|
116
|
+
ke as OPERATE_COLUMN_PROP,
|
|
117
|
+
Pt as PanelEditSwitch,
|
|
118
|
+
oe as PanelItem,
|
|
119
|
+
ae as PanelMain,
|
|
120
|
+
gt as ROUTE_MODULE_LEVEL,
|
|
121
|
+
me as SelectModule,
|
|
122
|
+
Pe as TABS_MAIN_VISUAL_LEVEL,
|
|
123
|
+
Lt as TableMain,
|
|
124
|
+
le as TabsMain,
|
|
125
|
+
Mt as TabsMainReplaceQueryKey,
|
|
126
|
+
ue as TriggerAutoImport,
|
|
127
|
+
ne as WatchSize,
|
|
128
|
+
p as appLayoutInstall,
|
|
129
|
+
Ct as checkLogin,
|
|
130
|
+
Ft as checkPermission,
|
|
131
|
+
Dt as countAll,
|
|
132
|
+
g as createAdminBridge,
|
|
133
|
+
bt as createAppStore,
|
|
134
|
+
Vt as createGenerateRouteMetaRawTree,
|
|
135
|
+
wt as createGuard,
|
|
136
|
+
yt as createListApi,
|
|
137
|
+
vt as createRoutePermissionStore,
|
|
138
|
+
Ht as createStorageWithNamespace,
|
|
139
|
+
Wt as createUseState,
|
|
140
|
+
Xt as createUserStore,
|
|
106
141
|
r as displayInstall,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
142
|
+
We as exportCSV,
|
|
143
|
+
Bt as fetchListAll,
|
|
144
|
+
Qt as flatRouteMetaResolveRaw,
|
|
110
145
|
t as formInstall,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
146
|
+
et as generateFormData,
|
|
147
|
+
tt as getBlurSubmit,
|
|
148
|
+
ot as getChangeSubmit,
|
|
149
|
+
Qe as getConfirmPasswordRule,
|
|
150
|
+
rt as getDatePickerShortcuts,
|
|
151
|
+
at as getEnterSubmit,
|
|
152
|
+
Zt as getId,
|
|
153
|
+
Se as getModalShelfInjectionKey,
|
|
154
|
+
ft as getPlaceholder,
|
|
155
|
+
qt as getRoutePermissionKey,
|
|
156
|
+
mt as getVModelSugar,
|
|
157
|
+
I as installComponents,
|
|
123
158
|
s as listPageInstall,
|
|
124
159
|
o as menuInstall,
|
|
125
160
|
a as miscInstall,
|
|
126
|
-
|
|
161
|
+
f as modalInstall,
|
|
127
162
|
l as panelInstall,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
163
|
+
st as parseFormData,
|
|
164
|
+
qe as passwordRule,
|
|
165
|
+
ze as pickExportColumns,
|
|
166
|
+
lt as resolveFormLayout,
|
|
167
|
+
Je as setFormComponentType,
|
|
168
|
+
pt as setInputComponent,
|
|
169
|
+
ut as setSelectComponent,
|
|
170
|
+
it as stringifyFormData,
|
|
171
|
+
nt as swiftFormItemConfig,
|
|
172
|
+
m as tableInstall,
|
|
173
|
+
eo as timeCountDown,
|
|
174
|
+
oo as useActivated,
|
|
175
|
+
ro as useActivatedEvent,
|
|
176
|
+
ao as useActivatedExec,
|
|
177
|
+
mo as useBreakpoint,
|
|
178
|
+
lo as useChannelViewportHeight,
|
|
179
|
+
uo as useFeelSize,
|
|
180
|
+
no as useMenusDataDispatch,
|
|
181
|
+
co as useTimeout
|
|
145
182
|
};
|
package/es/inject/key.mjs
CHANGED
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
const
|
|
1
|
+
const E = Symbol.for(
|
|
2
2
|
"BODY_CONTENT_VIEWPORT_HEIGHT"
|
|
3
|
-
), _ = Symbol.for(
|
|
4
|
-
"FULLSCREEN_HEIGHT_CHANNEL"
|
|
5
3
|
);
|
|
6
|
-
function
|
|
7
|
-
return Symbol.for(`MODAL_SHELF_${
|
|
4
|
+
function o(_) {
|
|
5
|
+
return Symbol.for(`MODAL_SHELF_${_}`);
|
|
8
6
|
}
|
|
7
|
+
const A = Symbol.for(
|
|
8
|
+
"TABS_MAIN_VISUAL_LEVEL"
|
|
9
|
+
), T = Symbol.for(
|
|
10
|
+
"APP_LAYOUT_APP_STORE_KEY"
|
|
11
|
+
), P = Symbol.for(
|
|
12
|
+
"APP_LAYOUT_USER_STORE_KEY"
|
|
13
|
+
), S = Symbol.for(
|
|
14
|
+
"APP_LAYOUT_BRIDGE_KEY"
|
|
15
|
+
);
|
|
9
16
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
17
|
+
T as APP_LAYOUT_APP_STORE_KEY,
|
|
18
|
+
S as APP_LAYOUT_BRIDGE_KEY,
|
|
19
|
+
P as APP_LAYOUT_USER_STORE_KEY,
|
|
20
|
+
E as BODY_CONTENT_VIEWPORT_HEIGHT,
|
|
21
|
+
A as TABS_MAIN_VISUAL_LEVEL,
|
|
22
|
+
o as getModalShelfInjectionKey
|
|
13
23
|
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { checkLogin as P } from "./login.mjs";
|
|
2
|
+
import { checkPermission as c } from "./permission.mjs";
|
|
3
|
+
const p = (s, r) => {
|
|
4
|
+
const { bridge: t, useRoutePermission: a } = r;
|
|
5
|
+
s.beforeEach(async (e, n, o) => {
|
|
6
|
+
const i = a();
|
|
7
|
+
if (!await P(e, i))
|
|
8
|
+
return o({
|
|
9
|
+
path: t.APP_ROUTER_PATHS_CONFIG.loginPath,
|
|
10
|
+
query: {
|
|
11
|
+
from: encodeURIComponent(e.fullPath)
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
if (!await c(e, i))
|
|
15
|
+
return o({
|
|
16
|
+
path: t.APP_ROUTER_PATHS_CONFIG.noPermissionPath,
|
|
17
|
+
query: {
|
|
18
|
+
target: encodeURIComponent(e.fullPath)
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
o();
|
|
22
|
+
}), s.beforeResolve((e) => {
|
|
23
|
+
const n = e.meta;
|
|
24
|
+
document.title = n.title;
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
P as checkLogin,
|
|
29
|
+
c as checkPermission,
|
|
30
|
+
p as createGuard
|
|
31
|
+
};
|
package/es/store/app.mjs
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { defineStore as k } from "pinia";
|
|
2
|
+
import { useRoute as R } from "vue-router";
|
|
3
|
+
import { ref as n, computed as t, watch as U } from "vue";
|
|
4
|
+
function M(b) {
|
|
5
|
+
const { bridge: o } = b;
|
|
6
|
+
return k("APP", () => {
|
|
7
|
+
const a = o.APP_LAYOUT_HEADER_CONFIG.height, d = o.APP_LAYOUT_FOOTER_CONFIG.height, P = n(o.APP_BASE_INFO.name), s = n(!1), T = n(!1), c = n(!1), i = n(!1), S = t(() => c.value ? o.APP_LAYOUT_SIDEBAR_CONFIG.collapseWidth : o.APP_LAYOUT_SIDEBAR_CONFIG.width), C = R(), r = t(
|
|
8
|
+
() => s.value ? o.APP_THEME_CONFIG.dark : o.APP_THEME_CONFIG.light
|
|
9
|
+
), h = t(() => C.meta), l = t(() => h.value.layout), E = t(() => h.value.keepAlive), m = t(
|
|
10
|
+
() => {
|
|
11
|
+
var e;
|
|
12
|
+
return ((e = l.value) == null ? void 0 : e.header) ?? o.APP_ROUTER_META_DEFAULT_CONFIG.showHeader;
|
|
13
|
+
}
|
|
14
|
+
), g = t(
|
|
15
|
+
() => {
|
|
16
|
+
var e;
|
|
17
|
+
return ((e = l.value) == null ? void 0 : e.footer) ?? o.APP_ROUTER_META_DEFAULT_CONFIG.showFooter;
|
|
18
|
+
}
|
|
19
|
+
), v = t(
|
|
20
|
+
() => {
|
|
21
|
+
var e;
|
|
22
|
+
return (((e = l.value) == null ? void 0 : e.sidebar) ?? o.APP_ROUTER_META_DEFAULT_CONFIG.showSidebar) && i.value;
|
|
23
|
+
}
|
|
24
|
+
), O = t(
|
|
25
|
+
() => {
|
|
26
|
+
var e;
|
|
27
|
+
return ((e = l.value) == null ? void 0 : e.breadcrumb) ?? o.APP_ROUTER_META_DEFAULT_CONFIG.showBreadcrumb;
|
|
28
|
+
}
|
|
29
|
+
), _ = t(
|
|
30
|
+
() => {
|
|
31
|
+
var e;
|
|
32
|
+
return ((e = l.value) == null ? void 0 : e.bodyShimPadding) ?? o.APP_LAYOUT_BODY_CONFIG.shimPadding;
|
|
33
|
+
}
|
|
34
|
+
), u = t(() => ({
|
|
35
|
+
height: `${m.value ? a : 0}px`,
|
|
36
|
+
backgroundColor: r.value.bodyColor,
|
|
37
|
+
color: r.value.baseColor
|
|
38
|
+
})), p = t(() => ({
|
|
39
|
+
height: `${g.value ? d : 0}px`,
|
|
40
|
+
backgroundColor: r.value.bodyColor
|
|
41
|
+
})), A = t(() => ({
|
|
42
|
+
width: `${v.value ? S.value : 0}px`,
|
|
43
|
+
paddingTop: u.value.height,
|
|
44
|
+
backgroundColor: r.value.bodyColor,
|
|
45
|
+
color: r.value.baseColor
|
|
46
|
+
})), I = t(() => ({
|
|
47
|
+
paddingLeft: A.value.width,
|
|
48
|
+
paddingTop: u.value.height,
|
|
49
|
+
backgroundColor: r.value.bodyColor
|
|
50
|
+
})), F = t(() => ({
|
|
51
|
+
minHeight: `calc(100vh - ${u.value.height} - ${p.value.height})`,
|
|
52
|
+
padding: `${_.value}px`
|
|
53
|
+
})), f = (e) => {
|
|
54
|
+
c.value = e;
|
|
55
|
+
}, y = (e) => {
|
|
56
|
+
i.value = e;
|
|
57
|
+
}, N = (e) => {
|
|
58
|
+
s.value = e;
|
|
59
|
+
};
|
|
60
|
+
return U(
|
|
61
|
+
s,
|
|
62
|
+
() => {
|
|
63
|
+
const e = document.documentElement.className;
|
|
64
|
+
s.value ? document.documentElement.className = `${e} dark`.trim() : document.documentElement.className = e.replace(/\bdark\b/g, "").trim();
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
immediate: !0
|
|
68
|
+
}
|
|
69
|
+
), {
|
|
70
|
+
name: P,
|
|
71
|
+
isDarkTheme: t(() => s.value),
|
|
72
|
+
theme: r,
|
|
73
|
+
extractLevel1ToHeader: T,
|
|
74
|
+
showHeader: m,
|
|
75
|
+
showFooter: g,
|
|
76
|
+
showSidebar: v,
|
|
77
|
+
showBreadcrumb: O,
|
|
78
|
+
keepAlive: E,
|
|
79
|
+
headerStyle: u,
|
|
80
|
+
footerStyle: p,
|
|
81
|
+
sidebarStyle: A,
|
|
82
|
+
bodyStyle: I,
|
|
83
|
+
bodyShimPadding: _,
|
|
84
|
+
bodyShimStyle: F,
|
|
85
|
+
sidebarIsCollapse: t(() => c.value),
|
|
86
|
+
changeSidebarCollapseStatus: f,
|
|
87
|
+
changeSidebarHasMenusStatus: y,
|
|
88
|
+
changeIsDarkTheme: N
|
|
89
|
+
};
|
|
90
|
+
}, {
|
|
91
|
+
persist: {
|
|
92
|
+
storage: {
|
|
93
|
+
getItem: (a) => o.getStorage().getItem(a),
|
|
94
|
+
setItem: (a, d) => o.getStorage().setItem(a, d),
|
|
95
|
+
removeItem: (a) => o.getStorage().removeItem(a)
|
|
96
|
+
},
|
|
97
|
+
pick: ["isDarkTheme"]
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
export {
|
|
102
|
+
M as createAppStore
|
|
103
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { defineStore as T } from "pinia";
|
|
2
|
+
import { computed as a, watch as p } from "vue";
|
|
3
|
+
import { useRoute as U, useRouter as C } from "vue-router";
|
|
4
|
+
import { getRoutePermissionKey as N } from "../utils/router.mjs";
|
|
5
|
+
function F(h) {
|
|
6
|
+
const { bridge: u, useUserStore: l, paths: o } = h;
|
|
7
|
+
return T("ROUTE_PERMISSION", () => {
|
|
8
|
+
const t = U(), i = C(), s = l(), c = a(() => s.isLogin), f = (e) => {
|
|
9
|
+
var r;
|
|
10
|
+
if (o.loginNoCheck.includes(e.path))
|
|
11
|
+
return !1;
|
|
12
|
+
const n = e.meta;
|
|
13
|
+
return !!N({
|
|
14
|
+
path: e.path,
|
|
15
|
+
permission: n.permission
|
|
16
|
+
}) || (((r = n.permission) == null ? void 0 : r.login) ?? u.APP_ROUTER_META_DEFAULT_CONFIG.needLogin);
|
|
17
|
+
}, m = (e) => f(e) && !c.value, P = a(() => m(t)), g = (e) => o.authNoCheck.includes(e.path) ? !1 : !s.havePermissionByPath(e.path), d = a(() => c.value && g(t)), R = (e = t, n = "replace") => {
|
|
18
|
+
s.noApiLogout();
|
|
19
|
+
const { fullPath: r, path: L } = e;
|
|
20
|
+
L !== o.login && t.path !== o.login && i[n]({
|
|
21
|
+
path: o.login,
|
|
22
|
+
query: {
|
|
23
|
+
from: encodeURIComponent(r)
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
return u.register({ goToLogin: R }), p(
|
|
28
|
+
P,
|
|
29
|
+
(e) => {
|
|
30
|
+
e && i.replace({
|
|
31
|
+
path: o.login,
|
|
32
|
+
query: {
|
|
33
|
+
from: encodeURIComponent(t.fullPath)
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
immediate: !0
|
|
39
|
+
}
|
|
40
|
+
), p(
|
|
41
|
+
d,
|
|
42
|
+
(e) => {
|
|
43
|
+
if (e) {
|
|
44
|
+
const n = t.meta;
|
|
45
|
+
i.replace({
|
|
46
|
+
path: o.noPermission,
|
|
47
|
+
query: {
|
|
48
|
+
target: encodeURIComponent(t.fullPath),
|
|
49
|
+
title: encodeURIComponent(n.title || "")
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
immediate: !0
|
|
56
|
+
}
|
|
57
|
+
), {
|
|
58
|
+
checkNeedGoToAuthPage: g,
|
|
59
|
+
checkNeedGoToLoginPage: m
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
export {
|
|
64
|
+
F as createRoutePermissionStore
|
|
65
|
+
};
|