@done-coding/admin-core 0.3.0 → 0.3.1-alpha.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 +24 -40
- 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 +11 -11
- 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/table/TableMain.vue.mjs +3 -3
- package/es/components/table/TableMain.vue2.mjs +103 -102
- package/es/hooks/use-breakpoint.mjs +40 -0
- package/es/hooks/use-channel-viewport-height.mjs +18 -0
- package/es/index.mjs +88 -84
- package/es/inject/key.mjs +7 -6
- package/es/style.css +1 -1
- package/package.json +3 -2
- package/types/bridge/index.d.ts +23 -23
- 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 +6 -12
- package/types/components/display/types.d.ts +46 -31
- 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/index.d.ts +10 -1
- package/types/components/modal/ConfirmModal.vue.d.ts +2 -2
- package/types/components/table/TableToolbar.vue.d.ts +8 -8
- package/types/components/table/types.d.ts +4 -0
- 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/inject/key.d.ts +11 -11
package/es/index.mjs
CHANGED
|
@@ -6,16 +6,16 @@ import { modalInstall as m } from "./components/modal/index.mjs";
|
|
|
6
6
|
import { tableInstall as f } 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 { createAdminBridge as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
9
|
+
import { createAdminBridge as E } from "./bridge/index.mjs";
|
|
10
|
+
import { default as S } from "./components/misc/ActionBtn.vue.mjs";
|
|
11
|
+
import { default as C } from "./components/misc/ActionButton.vue.mjs";
|
|
12
|
+
import { default as P } from "./components/misc/ActionButtonDanger.vue.mjs";
|
|
13
13
|
import { default as R } from "./components/misc/ActionButtonWarn.vue.mjs";
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
14
|
+
import { default as O } from "./components/modal/DetailModal.vue.mjs";
|
|
15
|
+
import { default as y } from "./components/form/FormMain.vue.mjs";
|
|
16
|
+
import { default as B } from "./components/form/FormRadioGroup.vue.mjs";
|
|
17
|
+
import { default as b } from "./components/form/FormSelect.vue.mjs";
|
|
18
|
+
import { default as v } from "./components/form/FormTree.vue.mjs";
|
|
19
19
|
import { default as U } from "./components/form/FormVerifyCode.vue.mjs";
|
|
20
20
|
import { default as K } from "./components/display/HeightProvider.vue.mjs";
|
|
21
21
|
import { default as k } from "./components/menu/MenuItemSub.vue.mjs";
|
|
@@ -24,102 +24,104 @@ import { default as j } from "./components/modal/ModalPorter.vue.mjs";
|
|
|
24
24
|
import { default as q } from "./components/modal/ModalShelf.vue.mjs";
|
|
25
25
|
import { default as Z } from "./components/panel/PanelItem.vue.mjs";
|
|
26
26
|
import { default as ee } from "./components/panel/PanelMain.vue.mjs";
|
|
27
|
-
import { default as oe } from "./components/
|
|
28
|
-
import { default as ae } from "./components/
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import { default as ie } from "./components/misc/
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import { default as ze } from "./components/form/
|
|
39
|
-
import { default as Ye } from "./components/
|
|
40
|
-
import { default as Qe } from "./components/
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import { default as ot } from "./components/
|
|
27
|
+
import { default as oe } from "./components/display/TabsMain.vue.mjs";
|
|
28
|
+
import { default as ae } from "./components/misc/TriggerAutoImport.vue.mjs";
|
|
29
|
+
import { default as fe } from "./components/display/WatchSize.vue.mjs";
|
|
30
|
+
import { APP_API_LIST_MODEL_KEY_CONFIG as le } from "./config/list-model.mjs";
|
|
31
|
+
import { default as ie } from "./components/misc/ActionConfirm.vue.mjs";
|
|
32
|
+
import { default as pe } from "./components/misc/AutoRefresh.vue.mjs";
|
|
33
|
+
import { BODY_CONTENT_VIEWPORT_HEIGHT as de, TABS_MAIN_VISUAL_LEVEL as ce, getModalShelfInjectionKey as Ie } from "./inject/key.mjs";
|
|
34
|
+
import { default as Ae } from "./components/modal/ConfirmModal.vue.mjs";
|
|
35
|
+
import { EXPORT_MAX_LIMIT as Ee, OPERATE_COLUMN_PROP as _e, exportCSV as Se, pickExportColumns as Te } from "./utils/export.mjs";
|
|
36
|
+
import { FORM_CONFIG_SELECT_ALL_VALUE as Le, getConfirmPasswordRule as Pe, passwordRule as Fe, setFormComponentType as Re } from "./helpers/form.mjs";
|
|
37
|
+
import { FORM_ITEM_CHANGE_LOADING as Oe, generateFormData as De, getBlurSubmit as ye, getChangeSubmit as Ve, getDatePickerShortcuts as Be, getEnterSubmit as Ne, getPlaceholder as be, getVModelSugar as we, parseFormData as ve, resolveFormLayout as Ge, setInputComponent as Ue, setSelectComponent as He, stringifyFormData as Ke, swiftFormItemConfig as We } from "./components/form/utils.mjs";
|
|
38
|
+
import { default as ze } from "./components/form/FormSearch.vue.mjs";
|
|
39
|
+
import { default as Ye } from "./components/form/FormVerifyImage.vue.mjs";
|
|
40
|
+
import { default as Qe } from "./components/list-page/ListPage.vue.mjs";
|
|
41
|
+
import { default as Je } from "./components/panel/PanelEditSwitch.vue.mjs";
|
|
42
|
+
import { ROUTE_MODULE_LEVEL as $e, TabsMainReplaceQueryKey as et } from "./config/route.mjs";
|
|
43
|
+
import { default as ot } from "./components/table/TableMain.vue.mjs";
|
|
44
44
|
import { countAll as at, createListApi as mt, fetchListAll as ft } from "./helpers/list-helper.mjs";
|
|
45
45
|
import { createGenerateRouteMetaRawTree as lt } from "./helpers/route.mjs";
|
|
46
46
|
import { createStorageWithNamespace as it } from "./helpers/storage.mjs";
|
|
47
47
|
import { createUseState as pt } from "./helpers/state.mjs";
|
|
48
48
|
import { createUserStore as dt } from "./store/user.mjs";
|
|
49
|
-
import { flatRouteMetaResolveRaw as It, getRoutePermissionKey as
|
|
49
|
+
import { flatRouteMetaResolveRaw as It, getRoutePermissionKey as gt } from "./utils/router.mjs";
|
|
50
50
|
import { getId as Mt } from "./utils/id.mjs";
|
|
51
51
|
import { timeCountDown as _t } from "./utils/time.mjs";
|
|
52
|
-
import { useActivated as
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
|
|
52
|
+
import { useActivated as Tt, useActivatedEvent as Ct, useActivatedExec as Lt } from "./hooks/activated.mjs";
|
|
53
|
+
import { useBreakpoint as Ft } from "./hooks/use-breakpoint.mjs";
|
|
54
|
+
import { useChannelViewportHeight as ht } from "./hooks/use-channel-viewport-height.mjs";
|
|
55
|
+
import { useFeelSize as Dt } from "./hooks/feel-size.mjs";
|
|
56
|
+
import { useMenusDataDispatch as Vt } from "./hooks/menus-dispatch.mjs";
|
|
57
|
+
import { useTimeout as Nt } from "./hooks/timeout.mjs";
|
|
58
|
+
const g = {
|
|
57
59
|
install(e) {
|
|
58
60
|
e.use(t), e.use(o), e.use(r), e.use(a), e.use(m), e.use(f), e.use(s), e.use(l);
|
|
59
61
|
}
|
|
60
62
|
};
|
|
61
63
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
le as APP_API_LIST_MODEL_KEY_CONFIG,
|
|
65
|
+
S as ActionBtn,
|
|
66
|
+
C as ActionButton,
|
|
67
|
+
P as ActionButtonDanger,
|
|
66
68
|
R as ActionButtonWarn,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
v as
|
|
80
|
-
B as FormTree,
|
|
69
|
+
ie as ActionConfirm,
|
|
70
|
+
pe as AutoRefresh,
|
|
71
|
+
de as BODY_CONTENT_VIEWPORT_HEIGHT,
|
|
72
|
+
Ae as ConfirmModal,
|
|
73
|
+
O as DetailModal,
|
|
74
|
+
Ee as EXPORT_MAX_LIMIT,
|
|
75
|
+
Le as FORM_CONFIG_SELECT_ALL_VALUE,
|
|
76
|
+
Oe as FORM_ITEM_CHANGE_LOADING,
|
|
77
|
+
y as FormMain,
|
|
78
|
+
B as FormRadioGroup,
|
|
79
|
+
ze as FormSearch,
|
|
80
|
+
b as FormSelect,
|
|
81
|
+
v as FormTree,
|
|
81
82
|
U as FormVerifyCode,
|
|
82
|
-
|
|
83
|
+
Ye as FormVerifyImage,
|
|
83
84
|
K as HeightProvider,
|
|
84
|
-
|
|
85
|
+
Qe as ListPage,
|
|
85
86
|
k as MenuItemSub,
|
|
86
87
|
X as MenuTree,
|
|
87
88
|
j as ModalPorter,
|
|
88
89
|
q as ModalShelf,
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
_e as OPERATE_COLUMN_PROP,
|
|
91
|
+
Je as PanelEditSwitch,
|
|
91
92
|
Z as PanelItem,
|
|
92
93
|
ee as PanelMain,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
ot as
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
ae as
|
|
94
|
+
$e as ROUTE_MODULE_LEVEL,
|
|
95
|
+
ce as TABS_MAIN_VISUAL_LEVEL,
|
|
96
|
+
ot as TableMain,
|
|
97
|
+
oe as TabsMain,
|
|
98
|
+
et as TabsMainReplaceQueryKey,
|
|
99
|
+
ae as TriggerAutoImport,
|
|
100
|
+
fe as WatchSize,
|
|
99
101
|
at as countAll,
|
|
100
|
-
|
|
102
|
+
E as createAdminBridge,
|
|
101
103
|
lt as createGenerateRouteMetaRawTree,
|
|
102
104
|
mt as createListApi,
|
|
103
105
|
it as createStorageWithNamespace,
|
|
104
106
|
pt as createUseState,
|
|
105
107
|
dt as createUserStore,
|
|
106
108
|
r as displayInstall,
|
|
107
|
-
|
|
109
|
+
Se as exportCSV,
|
|
108
110
|
ft as fetchListAll,
|
|
109
111
|
It as flatRouteMetaResolveRaw,
|
|
110
112
|
t as formInstall,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
De as generateFormData,
|
|
114
|
+
ye as getBlurSubmit,
|
|
115
|
+
Ve as getChangeSubmit,
|
|
116
|
+
Pe as getConfirmPasswordRule,
|
|
117
|
+
Be as getDatePickerShortcuts,
|
|
118
|
+
Ne as getEnterSubmit,
|
|
117
119
|
Mt as getId,
|
|
118
|
-
|
|
120
|
+
Ie as getModalShelfInjectionKey,
|
|
119
121
|
be as getPlaceholder,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
gt as getRoutePermissionKey,
|
|
123
|
+
we as getVModelSugar,
|
|
124
|
+
g as installComponents,
|
|
123
125
|
s as listPageInstall,
|
|
124
126
|
o as menuInstall,
|
|
125
127
|
a as miscInstall,
|
|
@@ -127,19 +129,21 @@ export {
|
|
|
127
129
|
l as panelInstall,
|
|
128
130
|
ve as parseFormData,
|
|
129
131
|
Fe as passwordRule,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
Te as pickExportColumns,
|
|
133
|
+
Ge as resolveFormLayout,
|
|
134
|
+
Re as setFormComponentType,
|
|
135
|
+
Ue as setInputComponent,
|
|
134
136
|
He as setSelectComponent,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
+
Ke as stringifyFormData,
|
|
138
|
+
We as swiftFormItemConfig,
|
|
137
139
|
f as tableInstall,
|
|
138
140
|
_t as timeCountDown,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
Dt as
|
|
141
|
+
Tt as useActivated,
|
|
142
|
+
Ct as useActivatedEvent,
|
|
143
|
+
Lt as useActivatedExec,
|
|
144
|
+
Ft as useBreakpoint,
|
|
145
|
+
ht as useChannelViewportHeight,
|
|
146
|
+
Dt as useFeelSize,
|
|
147
|
+
Vt as useMenusDataDispatch,
|
|
148
|
+
Nt as useTimeout
|
|
145
149
|
};
|
package/es/inject/key.mjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
const o = 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 E(_) {
|
|
5
|
+
return Symbol.for(`MODAL_SHELF_${_}`);
|
|
8
6
|
}
|
|
7
|
+
const T = Symbol.for(
|
|
8
|
+
"TABS_MAIN_VISUAL_LEVEL"
|
|
9
|
+
);
|
|
9
10
|
export {
|
|
10
11
|
o as BODY_CONTENT_VIEWPORT_HEIGHT,
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
T as TABS_MAIN_VISUAL_LEVEL,
|
|
13
|
+
E as getModalShelfInjectionKey
|
|
13
14
|
};
|
package/es/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.form-item-tip[data-v-0dd66b41]{text-align:left;line-height:1.5;font-size:12px}.form-item-label-hide[data-v-0dd66b41] .el-form-item__label-wrap{display:none}.form-search_show[data-v-
|
|
1
|
+
.form-item-tip[data-v-0dd66b41]{text-align:left;line-height:1.5;font-size:12px}.form-item-label-hide[data-v-0dd66b41] .el-form-item__label-wrap{display:none}.form-search_show[data-v-996aa2dc]{margin-bottom:10px}.form-search .btn-box[data-v-996aa2dc]{display:flex;align-items:center;gap:8px;justify-content:flex-end}.form-search .btn-box-expand-icon[data-v-996aa2dc]{margin-right:2px}.form-search[data-v-996aa2dc] .el-col{padding-left:14px}.form-verify-image[data-v-a4baf877] .el-input__suffix-inner *{margin:0}.form-verify-image-suffix[data-v-a4baf877]{position:absolute;height:100%;border-radius:var(--el-input-border-radius, var(--el-border-radius-base));top:50%;transform:translateY(-50%);overflow:hidden;cursor:pointer}.form-verify-image-suffix-main[data-v-a4baf877]{position:absolute;left:0;top:0;width:100%;height:100%;background-color:#f4f4f4}.tabs-main-bar[data-v-dbdd01cb]{position:relative;display:flex;align-items:center}.tabs-main-bar-item[data-v-dbdd01cb]{border:none;background:transparent;cursor:pointer;color:var(--el-text-color-regular);transition:background .2s,color .2s,box-shadow .2s}.tabs-main-bar-indicator[data-v-dbdd01cb]{position:absolute;left:0;background:var(--el-color-primary);transition:transform .2s,width .2s}.tabs-main-bar--l1 .tabs-main-bar-item[data-v-dbdd01cb]{font-size:16px}.tabs-main-bar--l2 .tabs-main-bar-item[data-v-dbdd01cb]{font-size:14px}.tabs-main-bar--l3 .tabs-main-bar-item[data-v-dbdd01cb],.tabs-main-bar--l4 .tabs-main-bar-item[data-v-dbdd01cb]{font-size:12px}.tabs-main-bar--variant-card[data-v-dbdd01cb]{position:relative;overflow:hidden;gap:2px}.tabs-main-bar--variant-card .tabs-main-bar-item[data-v-dbdd01cb]{position:relative;padding:8px 20px;line-height:1.4;border:1px solid transparent;border-bottom:0;border-radius:6px 6px 0 0}.tabs-main-bar--variant-card .tabs-main-bar-item[data-v-dbdd01cb]:hover:not(.tabs-main-bar-item_active){color:var(--el-color-primary)}.tabs-main-bar--variant-card .tabs-main-bar-item_active[data-v-dbdd01cb]{color:var(--el-color-primary);border-color:var(--el-border-color-light)}.tabs-main-bar--variant-card .tabs-main-bar-item_active[data-v-dbdd01cb]:before,.tabs-main-bar--variant-card .tabs-main-bar-item_active[data-v-dbdd01cb]:after{content:"";position:absolute;bottom:0;width:100vw;height:1px;background:var(--el-border-color-light)}.tabs-main-bar--variant-card .tabs-main-bar-item_active[data-v-dbdd01cb]:before{right:100%}.tabs-main-bar--variant-card .tabs-main-bar-item_active[data-v-dbdd01cb]:after{left:100%}.tabs-main-bar--variant-indicator .tabs-main-bar-item[data-v-dbdd01cb]{padding:8px 16px}.tabs-main-bar--variant-indicator .tabs-main-bar-item_active[data-v-dbdd01cb]{color:var(--el-color-primary)}.tabs-main-bar--variant-indicator .tabs-main-bar-indicator[data-v-dbdd01cb]{bottom:0;height:2px}.tabs-main-bar--variant-indicator-compact .tabs-main-bar-item[data-v-dbdd01cb]{padding:6px 10px}.tabs-main-bar--variant-indicator-compact .tabs-main-bar-item_active[data-v-dbdd01cb]{color:var(--el-color-primary)}.tabs-main-bar--variant-indicator-compact .tabs-main-bar-indicator[data-v-dbdd01cb]{bottom:0;height:1px}.tabs-main-bar--variant-plain .tabs-main-bar-item[data-v-dbdd01cb]{padding:4px 8px}.tabs-main-bar--variant-plain .tabs-main-bar-item_active[data-v-dbdd01cb]{color:var(--el-color-primary);font-weight:600}.auto-refresh[data-v-9d78ca06]{display:flex;align-items:center;gap:8px}.auto-refresh-label[data-v-9d78ca06]{font-size:13px;color:var(--el-text-color-regular)}.auto-refresh-interval[data-v-9d78ca06]{width:80px}.action-confirm__title[data-v-1003e4cb]{font-weight:600;margin-bottom:6px}.action-confirm__content[data-v-1003e4cb]{margin-bottom:12px;color:var(--el-text-color-regular)}.action-confirm__actions[data-v-1003e4cb]{display:flex;justify-content:flex-end;gap:8px}.confirm-dialog .content[data-v-2f0c870e]{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 200px)}.confirm-dialog .btn[data-v-2f0c870e]{width:150px;height:40px;border-radius:4px}.confirm-dialog .main[data-v-2f0c870e]{position:relative;text-align:center}.confirm-dialog .main .close-box[data-v-2f0c870e]{position:absolute;top:0;right:0;cursor:pointer;z-index:2}.confirm-dialog .main .shim[data-v-2f0c870e]{position:relative;z-index:1}.confirm-dialog .main .shim .title[data-v-2f0c870e]{font-size:18px;font-weight:500}.confirm-dialog .main .shim .content[data-v-2f0c870e]{font-size:16px;margin-top:15px}.confirm-dialog .main .shim .footer[data-v-2f0c870e]{display:flex;justify-content:center;align-items:center;padding-top:5px}.confirm-dialog .main .shim .footer>.btn[data-v-2f0c870e]:not(:last-child){margin-right:30px}.confirm-dialog .main .shim .footer[reverse=true][data-v-2f0c870e]{flex-direction:row-reverse}.confirm-dialog .main .shim .footer[reverse=true]>.btn[data-v-2f0c870e]:not(:last-child){margin-right:0;margin-left:30px}.confirm-dialog .el-dialog__header,.confirm-dialog .el-dialog__body{padding:0;background-color:transparent}.table-toolbar[data-v-90cd7b54]{display:flex;justify-content:space-between;align-items:center;padding-bottom:8px;gap:20px}.table-toolbar-left[data-v-90cd7b54],.table-toolbar-right[data-v-90cd7b54]{display:flex;align-items:center;gap:10px}.table-toolbar-icon--rotating[data-v-90cd7b54]{animation:table-toolbar-rotating-90cd7b54 1s linear infinite}@keyframes table-toolbar-rotating-90cd7b54{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.data-list-view[data-v-4c7d7547]{width:100%}.table-main-table[data-v-feb76359]{--el-table-header-bg-color: var(--v028010cb)}.table-main-pagination[data-v-feb76359]{margin-top:10px;display:flex;justify-content:flex-end}.list-page[data-v-d8d188e5]{min-height:var(--v990abd1c)}.list-page-header[data-v-d8d188e5],.list-page-operation[data-v-d8d188e5]{margin-bottom:10px}.list-page[data-v-d8d188e5] .el-loading-mask{left:-10px;top:-10px;right:-10px;bottom:-10px}.panel-edit-switch[data-v-ea2a07d5]{position:relative}.panel-edit-switch-edit-btn[data-v-ea2a07d5]{position:absolute;top:0;right:0;z-index:1}.panel-edit-switch-actions[data-v-ea2a07d5]{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@done-coding/admin-core",
|
|
3
|
-
"version": "0.3.0",
|
|
3
|
+
"version": "0.3.1-alpha.0",
|
|
4
4
|
"description": "后台管理核心",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "lib/index.cjs",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
54
54
|
"@vitejs/plugin-vue-jsx": "^4.1.2",
|
|
55
55
|
"@vitest/coverage-istanbul": "^1.6.1",
|
|
56
|
+
"@vue/test-utils": "^2.4.10",
|
|
56
57
|
"jsdom": "^29.1.0",
|
|
57
58
|
"less": "^4.2.0",
|
|
58
59
|
"typescript": "^5.2.2",
|
|
@@ -77,5 +78,5 @@
|
|
|
77
78
|
"node": ">=18.0.0",
|
|
78
79
|
"pnpm": ">=9.0.0"
|
|
79
80
|
},
|
|
80
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "d1b3e1f8a27692f1f54902567599849a61e1595e"
|
|
81
82
|
}
|
package/types/bridge/index.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ import { RouteRecordRaw } from 'vue-router';
|
|
|
3
3
|
/**
|
|
4
4
|
* 认证桥接无状态纯工厂。
|
|
5
5
|
*
|
|
6
|
-
* core 模块级零状态——每次调用 `createAdminBridge()` 在函数作用域内新建一组
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* core 模块级零状态——每次调用 `createAdminBridge({...})` 在函数作用域内新建一组
|
|
7
|
+
* 闭包变量,传入 init 参数立即初始化,返回可直接使用的实例。core [MUST NOT] 持
|
|
8
|
+
* 已实例化单例(避免 dist/src 双 module instance 分裂,规避机制见 design §2.3,
|
|
9
9
|
* 结构上不持单例,[MUST NOT] 用 Symbol.for / globalThis 兜底)。
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
@@ -167,7 +167,7 @@ export type UserInfoFieldAccess<UserInfo = unknown> = string | {
|
|
|
167
167
|
/**
|
|
168
168
|
* UserInfo 的 token / refreshToken 双字段访问器集(v3 终锁 Δ0a)。
|
|
169
169
|
*
|
|
170
|
-
* 经 `
|
|
170
|
+
* 经 `createAdminBridge({ userInfoAccess })` 注入 → createUserStore 经
|
|
171
171
|
* `bridge.getUserInfoAccess()` 取,使 core 对 UserInfo token/refreshToken
|
|
172
172
|
* 字段名零硬编(用户终锁 1/6)。permission **不入此集**(design D-a)。
|
|
173
173
|
*/
|
|
@@ -178,7 +178,7 @@ export interface UserInfoAccess<UserInfo = unknown> {
|
|
|
178
178
|
refreshToken: UserInfoFieldAccess<UserInfo>;
|
|
179
179
|
}
|
|
180
180
|
/**
|
|
181
|
-
* `
|
|
181
|
+
* `createAdminBridge` 入参类型,全入参均必传。
|
|
182
182
|
*
|
|
183
183
|
* `appConfig` 与 `storage` 均为 env-driven、不依赖 core、app pre-Vue 即可备好;
|
|
184
184
|
* `routes`(#4e additive)为 app 嵌套路由树(带 children),createUserStore 经此算权限树;
|
|
@@ -200,17 +200,11 @@ export interface AdminBridgeInitOptions<UserInfo = unknown> {
|
|
|
200
200
|
/**
|
|
201
201
|
* 认证桥接实例类型。
|
|
202
202
|
*
|
|
203
|
-
* 调用侧 4 auth 方法签名与原 app `@/config` facade
|
|
204
|
-
*
|
|
203
|
+
* 调用侧 4 auth 方法签名与原 app `@/config` facade 完全一致。
|
|
204
|
+
* 工厂 `createAdminBridge(options)` 接收 init 参数,内部立即初始化,
|
|
205
|
+
* 返回即用的实例——消除 create-then-init 两步时序耦合。
|
|
205
206
|
*/
|
|
206
207
|
export interface AdminBridge<UserInfo = unknown, LoginParams = unknown> {
|
|
207
|
-
/**
|
|
208
|
-
* 启动期一次性注入 appConfig / storage / routes / userInfoAccess / getUserInfoInitFn
|
|
209
|
-
* (重复调用运行时幂等覆盖,[MUST NOT] throw/warn;v3 终锁 Δ0c:类型层返回
|
|
210
|
-
* `Omit<AdminBridge,"init">` 防重复 init 误用 + 支持链式,语句式 `bridge.init({...})`
|
|
211
|
-
* 调用继续合法不强制消费返回值)。
|
|
212
|
-
*/
|
|
213
|
-
init: (options: AdminBridgeInitOptions<UserInfo>) => Omit<AdminBridge<UserInfo, LoginParams>, "init">;
|
|
214
208
|
/** 注册 auth fn + 业务 api(增量合并,多次调用就近增量,后注册覆盖前注册) */
|
|
215
209
|
register: (options: AdminBridgeRegisterOptions<UserInfo, LoginParams>) => void;
|
|
216
210
|
/** 取 token(v3 终锁 BR-1 ③ 终裁零参;现有无参调用 `bridge.getToken()` 继续合法,泛型 `<UserInfo>` 纯透传不沾本签名) */
|
|
@@ -221,15 +215,15 @@ export interface AdminBridge<UserInfo = unknown, LoginParams = unknown> {
|
|
|
221
215
|
refreshToken: () => Promise<void>;
|
|
222
216
|
/** 刷新鉴权 */
|
|
223
217
|
refreshAuth: () => Promise<void>;
|
|
224
|
-
/**
|
|
218
|
+
/** 返回 `init` 注册的 appConfig 引用 */
|
|
225
219
|
getAppConfig: () => AppConfig;
|
|
226
|
-
/**
|
|
220
|
+
/** 返回 `init` 注册的 storage 引用 */
|
|
227
221
|
getStorage: () => StorageLike;
|
|
228
|
-
/**
|
|
222
|
+
/** 返回 `init` 注册的 routes 引用 */
|
|
229
223
|
getRoutes: () => RouteRecordRaw[];
|
|
230
|
-
/**
|
|
224
|
+
/** 返回 `init` 注册的 userInfoAccess 引用(v3 终锁 Δ0d,镜像 getRoutes 范式) */
|
|
231
225
|
getUserInfoAccess: () => UserInfoAccess<UserInfo>;
|
|
232
|
-
/**
|
|
226
|
+
/** 返回 `init` 注册的 getUserInfoInitFn 引用(v3 终锁 Δ0d,镜像 getRoutes 范式) */
|
|
233
227
|
getUserInfoInitFn: () => () => UserInfo;
|
|
234
228
|
/** 登录 api(createUserStore login 内调;未注册被调同步 throw 原生 Error 前 reject——异步对 reject 原生 Error) */
|
|
235
229
|
loginApi: (params: LoginParams) => Promise<{
|
|
@@ -251,11 +245,17 @@ export interface AdminBridge<UserInfo = unknown, LoginParams = unknown> {
|
|
|
251
245
|
}>;
|
|
252
246
|
}
|
|
253
247
|
/**
|
|
254
|
-
*
|
|
255
|
-
*
|
|
248
|
+
* 认证桥接无状态纯工厂:接收 init 参数,内部立即初始化,返回可直接使用的
|
|
249
|
+
* `AdminBridge` 实例。实例状态(appConfig / storage / routes / fn 引用)仅存在于
|
|
256
250
|
* 本次调用的闭包内,工厂自身零状态。
|
|
257
251
|
*
|
|
258
252
|
* @example
|
|
259
|
-
* const appAdminBridge = createAdminBridge<LoginAccountInfo, AccountLoginParams>(
|
|
253
|
+
* const appAdminBridge = createAdminBridge<LoginAccountInfo, AccountLoginParams>({
|
|
254
|
+
* appConfig: { ... },
|
|
255
|
+
* storage: localStorageWithNamespace,
|
|
256
|
+
* routes,
|
|
257
|
+
* userInfoAccess: { token: "token", refreshToken: "refresh_token" },
|
|
258
|
+
* getUserInfoInitFn: getUserInfoInit,
|
|
259
|
+
* });
|
|
260
260
|
*/
|
|
261
|
-
export declare function createAdminBridge<UserInfo = unknown, LoginParams = unknown>(): AdminBridge<UserInfo, LoginParams>;
|
|
261
|
+
export declare function createAdminBridge<UserInfo = unknown, LoginParams = unknown>(options: AdminBridgeInitOptions<UserInfo>): AdminBridge<UserInfo, LoginParams>;
|
|
@@ -3,15 +3,19 @@ import { HeightProviderProps } from './types';
|
|
|
3
3
|
declare function __VLS_template(): {
|
|
4
4
|
header?(_: {}): any;
|
|
5
5
|
default?(_: {
|
|
6
|
-
|
|
6
|
+
viewportHeight: number;
|
|
7
7
|
}): any;
|
|
8
8
|
};
|
|
9
9
|
declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<HeightProviderProps>, {
|
|
10
|
-
|
|
11
|
-
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
10
|
+
minHeight: number;
|
|
11
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
+
childViewportHeightChange: (value: number) => void;
|
|
13
|
+
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<HeightProviderProps>, {
|
|
14
|
+
minHeight: number;
|
|
15
|
+
}>>> & Readonly<{
|
|
16
|
+
onChildViewportHeightChange?: ((value: number) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
minHeight: number;
|
|
15
19
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
16
20
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
17
21
|
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { TabsHeaderVariant, TabsMainItem } from './types';
|
|
2
|
+
|
|
3
|
+
declare function __VLS_template(): Partial<Record<string, (_: {
|
|
4
|
+
tab: TabsMainItem;
|
|
5
|
+
active: boolean;
|
|
6
|
+
}) => any>>;
|
|
7
|
+
declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
8
|
+
activeKey: import('vue').PropType<string>;
|
|
9
|
+
level: {
|
|
10
|
+
type: globalThis.PropType<number>;
|
|
11
|
+
default: number;
|
|
12
|
+
};
|
|
13
|
+
tabs: {
|
|
14
|
+
type: globalThis.PropType<TabsMainItem[]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
variant: {
|
|
18
|
+
type: globalThis.PropType<TabsHeaderVariant>;
|
|
19
|
+
};
|
|
20
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
21
|
+
activeKey: import('vue').PropType<string>;
|
|
22
|
+
level: {
|
|
23
|
+
type: globalThis.PropType<number>;
|
|
24
|
+
default: number;
|
|
25
|
+
};
|
|
26
|
+
tabs: {
|
|
27
|
+
type: globalThis.PropType<TabsMainItem[]>;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
variant: {
|
|
31
|
+
type: globalThis.PropType<TabsHeaderVariant>;
|
|
32
|
+
};
|
|
33
|
+
}>> & Readonly<{}>, {
|
|
34
|
+
level: number;
|
|
35
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
36
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
37
|
+
export default _default;
|
|
38
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
39
|
+
new (): {
|
|
40
|
+
$slots: S;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -6,32 +6,74 @@ declare function __VLS_template(): Partial<Record<`header-${string}`, (_: {
|
|
|
6
6
|
}) => any>>;
|
|
7
7
|
declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
8
8
|
modelValue: import('vue').PropType<string>;
|
|
9
|
-
|
|
9
|
+
viewportHeight: {
|
|
10
10
|
type: globalThis.PropType<number>;
|
|
11
11
|
};
|
|
12
|
+
minHeight: {
|
|
13
|
+
type: globalThis.PropType<number>;
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
12
16
|
channel: {
|
|
13
|
-
type: globalThis.PropType<
|
|
14
|
-
|
|
17
|
+
type: globalThis.PropType<string>;
|
|
18
|
+
};
|
|
19
|
+
parentChannel: {
|
|
20
|
+
type: globalThis.PropType<string>;
|
|
21
|
+
};
|
|
22
|
+
padding: {
|
|
23
|
+
type: globalThis.PropType<import('./types').TabsMainPadding>;
|
|
24
|
+
};
|
|
25
|
+
refineReduceHeight: {
|
|
26
|
+
type: globalThis.PropType<number>;
|
|
27
|
+
default: number;
|
|
15
28
|
};
|
|
16
29
|
tabs: {
|
|
17
30
|
type: globalThis.PropType<TabsMainItem[]>;
|
|
18
31
|
required: true;
|
|
19
32
|
};
|
|
33
|
+
variant: {
|
|
34
|
+
type: globalThis.PropType<import('./types').TabsHeaderVariant>;
|
|
35
|
+
};
|
|
36
|
+
refine: {
|
|
37
|
+
type: globalThis.PropType<boolean>;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
20
40
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
21
41
|
modelValue: import('vue').PropType<string>;
|
|
22
|
-
|
|
42
|
+
viewportHeight: {
|
|
23
43
|
type: globalThis.PropType<number>;
|
|
24
44
|
};
|
|
45
|
+
minHeight: {
|
|
46
|
+
type: globalThis.PropType<number>;
|
|
47
|
+
default: number;
|
|
48
|
+
};
|
|
25
49
|
channel: {
|
|
26
|
-
type: globalThis.PropType<
|
|
27
|
-
|
|
50
|
+
type: globalThis.PropType<string>;
|
|
51
|
+
};
|
|
52
|
+
parentChannel: {
|
|
53
|
+
type: globalThis.PropType<string>;
|
|
54
|
+
};
|
|
55
|
+
padding: {
|
|
56
|
+
type: globalThis.PropType<import('./types').TabsMainPadding>;
|
|
57
|
+
};
|
|
58
|
+
refineReduceHeight: {
|
|
59
|
+
type: globalThis.PropType<number>;
|
|
60
|
+
default: number;
|
|
28
61
|
};
|
|
29
62
|
tabs: {
|
|
30
63
|
type: globalThis.PropType<TabsMainItem[]>;
|
|
31
64
|
required: true;
|
|
32
65
|
};
|
|
66
|
+
variant: {
|
|
67
|
+
type: globalThis.PropType<import('./types').TabsHeaderVariant>;
|
|
68
|
+
};
|
|
69
|
+
refine: {
|
|
70
|
+
type: globalThis.PropType<boolean>;
|
|
71
|
+
default: boolean;
|
|
72
|
+
};
|
|
33
73
|
}>> & Readonly<{}>, {
|
|
34
|
-
|
|
74
|
+
minHeight: number;
|
|
75
|
+
refineReduceHeight: number;
|
|
76
|
+
refine: boolean;
|
|
35
77
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
36
78
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
37
79
|
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
header?(_: {}): any;
|
|
3
|
+
default?(_: {}): any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
+
viewportHeightChange: (value: number | undefined) => void;
|
|
7
|
+
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
8
|
+
onViewportHeightChange?: ((value: number | undefined) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
10
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { TabsMainPadding } from './types';
|
|
2
|
+
|
|
3
|
+
interface TabsRefineFlowProps {
|
|
4
|
+
viewportHeight?: number;
|
|
5
|
+
minHeight?: number;
|
|
6
|
+
channel?: string;
|
|
7
|
+
parentChannel?: string;
|
|
8
|
+
padding?: TabsMainPadding;
|
|
9
|
+
/** 精细化预留高度(px),从 viewportHeightFinal 中预扣(在 padding 扣减与 HeightProvider header reserve 扣减之外) */
|
|
10
|
+
refineReduceHeight?: number;
|
|
11
|
+
}
|
|
12
|
+
declare function __VLS_template(): {
|
|
13
|
+
header?(_: {}): any;
|
|
14
|
+
default?(_: {}): any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TabsRefineFlowProps>, {
|
|
17
|
+
padding: () => TabsMainPadding;
|
|
18
|
+
refineReduceHeight: number;
|
|
19
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
viewportHeightChange: (value: number | undefined) => void;
|
|
21
|
+
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TabsRefineFlowProps>, {
|
|
22
|
+
padding: () => TabsMainPadding;
|
|
23
|
+
refineReduceHeight: number;
|
|
24
|
+
}>>> & Readonly<{
|
|
25
|
+
onViewportHeightChange?: ((value: number | undefined) => any) | undefined;
|
|
26
|
+
}>, {
|
|
27
|
+
padding: TabsMainPadding;
|
|
28
|
+
refineReduceHeight: number;
|
|
29
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
30
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
33
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
34
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
35
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
36
|
+
} : {
|
|
37
|
+
type: import('vue').PropType<T[K]>;
|
|
38
|
+
required: true;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
type __VLS_WithDefaults<P, D> = {
|
|
42
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
43
|
+
default: D[K];
|
|
44
|
+
}> : P[K];
|
|
45
|
+
};
|
|
46
|
+
type __VLS_Prettify<T> = {
|
|
47
|
+
[K in keyof T]: T[K];
|
|
48
|
+
} & {};
|
|
49
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
50
|
+
new (): {
|
|
51
|
+
$slots: S;
|
|
52
|
+
};
|
|
53
|
+
};
|