@done-coding/admin-core 0.7.0 → 0.7.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/components/display/ActionBtnGroup.vue.mjs +1 -1
- package/es/components/{misc → display}/ActionConfirm.vue.mjs +2 -2
- package/es/components/form/FormMain.vue.mjs +47 -44
- package/es/components/form/FormSearch.vue.mjs +2 -2
- package/es/components/form/FormSearch.vue2.mjs +47 -46
- package/es/components/form/FormSubmitBtn.vue.mjs +66 -0
- package/es/components/form/FormSubmitBtn.vue2.mjs +4 -0
- package/es/components/form/FormSubmitPanel.vue.mjs +7 -0
- package/es/components/form/FormSubmitPanel.vue2.mjs +112 -0
- package/es/components/panel/PanelEditSwitch.vue.mjs +1 -1
- package/es/components/panel/PanelEditSwitch.vue2.mjs +67 -71
- package/es/components/panel/PanelItem.vue.mjs +72 -42
- package/es/components/panel/PanelMain.vue.mjs +5 -78
- package/es/components/panel/PanelMain.vue2.mjs +99 -2
- package/es/index.mjs +92 -88
- package/es/style.css +1 -1
- package/package.json +4 -2
- package/types/components/display/index.d.ts +12 -0
- package/types/components/display/types.d.ts +87 -1
- package/types/components/form/FormItem.vue.d.ts +2 -2
- package/types/components/form/FormMain.vue.d.ts +1 -1
- package/types/components/form/FormSearch.vue.d.ts +1 -1
- package/types/components/form/FormSubmitBtn.vue.d.ts +20 -0
- package/types/components/form/FormSubmitPanel.vue.d.ts +46 -0
- package/types/components/form/index.d.ts +3 -1
- package/types/components/form/types.d.ts +68 -3
- package/types/components/list-page/ListPage.vue.d.ts +1 -1
- package/types/components/list-page/types.d.ts +1 -1
- package/types/components/misc/index.d.ts +1 -3
- package/types/components/misc/types.d.ts +0 -88
- package/types/components/panel/PanelItem.vue.d.ts +18 -10
- package/types/components/panel/PanelMain.vue.d.ts +3 -5
- package/types/components/panel/types.d.ts +64 -33
- package/types/components/panel/PanelEditSwitch.vue.d.ts +0 -28
- /package/es/components/{misc → display}/ActionBtn.vue.mjs +0 -0
- /package/es/components/{misc → display}/ActionBtn.vue2.mjs +0 -0
- /package/es/components/{misc → display}/ActionConfirm.vue2.mjs +0 -0
- /package/types/components/{misc → display}/ActionBtn.vue.d.ts +0 -0
- /package/types/components/{misc → display}/ActionConfirm.vue.d.ts +0 -0
package/es/index.mjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { createAdminBridge as r } from "./bridge/index.mjs";
|
|
2
|
-
import { default as a } from "./components/
|
|
2
|
+
import { default as a } from "./components/display/ActionBtn.vue.mjs";
|
|
3
3
|
import { default as m } from "./components/display/ActionBtnGroup.vue.mjs";
|
|
4
4
|
import { default as u } from "./components/display/BooleanTag.vue.mjs";
|
|
5
5
|
import { default as l } from "./components/modal/DetailModal.vue.mjs";
|
|
6
6
|
import { default as d } from "./components/form/FormMain.vue.mjs";
|
|
7
7
|
import { default as n } from "./components/form/FormRadioGroup.vue.mjs";
|
|
8
8
|
import { default as c } from "./components/form/FormSelect.vue.mjs";
|
|
9
|
-
import { default as E } from "./components/form/
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as g } from "./components/
|
|
12
|
-
import { default as L } from "./components/
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as h } from "./components/modal/
|
|
9
|
+
import { default as E } from "./components/form/FormSubmitBtn.vue.mjs";
|
|
10
|
+
import { default as P } from "./components/form/FormTree.vue.mjs";
|
|
11
|
+
import { default as g } from "./components/form/FormVerifyCode.vue.mjs";
|
|
12
|
+
import { default as L } from "./components/display/HeightProvider.vue.mjs";
|
|
13
|
+
import { default as F } from "./components/menu/MenuItemSub.vue.mjs";
|
|
14
|
+
import { default as O } from "./components/menu/MenuTree.vue.mjs";
|
|
15
|
+
import { default as h } from "./components/modal/ModalPorter.vue.mjs";
|
|
16
|
+
import { default as B } from "./components/modal/ModalShelf.vue.mjs";
|
|
16
17
|
import { default as y } from "./components/panel/PanelItem.vue.mjs";
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as V } from "./components/misc/SelectModule.vue.mjs";
|
|
18
|
+
import { default as U } from "./components/misc/SelectModule.vue.mjs";
|
|
19
19
|
import { default as N } from "./components/display/TabsMain.vue.mjs";
|
|
20
20
|
import { default as Y } from "./components/misc/TriggerAutoImport.vue.mjs";
|
|
21
21
|
import { default as K } from "./components/display/WatchSize.vue.mjs";
|
|
22
22
|
import { APP_API_LIST_MODEL_KEY_CONFIG as k } from "./config/list-model.mjs";
|
|
23
23
|
import { APP_LAYOUT_APP_STORE_KEY as z, APP_LAYOUT_BRIDGE_KEY as X, APP_LAYOUT_USER_STORE_KEY as j, BODY_CONTENT_VIEWPORT_HEIGHT as Q, TABS_MAIN_VISUAL_LEVEL as q, getModalShelfInjectionKey as J } from "./inject/key.mjs";
|
|
24
|
-
import { default as $ } from "./components/
|
|
24
|
+
import { default as $ } from "./components/display/ActionConfirm.vue.mjs";
|
|
25
25
|
import { default as oe } from "./components/app-layout/AppBody.vue.mjs";
|
|
26
26
|
import { default as te } from "./components/app-layout/AppBreadcrumb.vue.mjs";
|
|
27
27
|
import { default as fe } from "./components/app-layout/AppFooter.vue.mjs";
|
|
@@ -31,35 +31,37 @@ import { default as xe } from "./components/app-layout/AppPage.vue.mjs";
|
|
|
31
31
|
import { default as ie } from "./components/app-layout/AppSidebar.vue.mjs";
|
|
32
32
|
import { default as Ae } from "./components/misc/AutoRefresh.vue.mjs";
|
|
33
33
|
import { default as _e } from "./components/misc/AutoRefreshGroup.vue.mjs";
|
|
34
|
-
import { default as
|
|
34
|
+
import { default as Se } from "./components/modal/ConfirmModal.vue.mjs";
|
|
35
35
|
import { EXPORT_MAX_LIMIT as Te, OPERATE_COLUMN_PROP as ge, exportCSV as Me, pickExportColumns as Le } from "./utils/export.mjs";
|
|
36
|
-
import { FORM_CONFIG_SELECT_ALL_VALUE as
|
|
37
|
-
import { FORM_ITEM_CHANGE_LOADING as De, generateFormData as
|
|
36
|
+
import { FORM_CONFIG_SELECT_ALL_VALUE as Fe, getConfirmPasswordRule as Ie, passwordRule as Oe, setFormComponentType as Ce } from "./helpers/form.mjs";
|
|
37
|
+
import { FORM_ITEM_CHANGE_LOADING as De, generateFormData as Be, getBlurSubmit as be, getChangeSubmit as ye, getDatePickerShortcuts as Ge, getEnterSubmit as Ue, getPlaceholder as Ve, getVModelSugar as Ne, parseFormData as we, resolveFormLayout as Ye, setInputComponent as ve, setSelectComponent as Ke, stringifyFormData as He, swiftFormItemConfig as ke } from "./components/form/utils.mjs";
|
|
38
38
|
import { default as ze } from "./components/form/FormSearch.vue.mjs";
|
|
39
|
-
import { default as je } from "./components/form/
|
|
40
|
-
import { default as qe } from "./components/
|
|
41
|
-
import { default as Ze } from "./components/
|
|
42
|
-
import {
|
|
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
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
39
|
+
import { default as je } from "./components/form/FormSubmitPanel.vue.mjs";
|
|
40
|
+
import { default as qe } from "./components/form/FormVerifyImage.vue.mjs";
|
|
41
|
+
import { default as Ze } from "./components/list-page/ListPage.vue.mjs";
|
|
42
|
+
import { default as eo } from "./components/panel/PanelEditSwitch.vue.mjs";
|
|
43
|
+
import { default as ro } from "./components/panel/PanelMain.vue.mjs";
|
|
44
|
+
import { ROUTE_MODULE_LEVEL as ao, TabsMainReplaceQueryKey as fo } from "./config/route.mjs";
|
|
45
|
+
import { default as po } from "./components/table/TableMain.vue.mjs";
|
|
46
|
+
import { checkLogin as so } from "./router/guard/login.mjs";
|
|
47
|
+
import { checkPermission as xo } from "./router/guard/permission.mjs";
|
|
48
|
+
import { countAll as no, createListApi as Ao, fetchListAll as co } from "./helpers/list-helper.mjs";
|
|
49
|
+
import { createAppStore as Eo } from "./store/app.mjs";
|
|
50
|
+
import { createGenerateRouteMetaRawTree as Po } from "./bridge/route.mjs";
|
|
51
|
+
import { createGuard as go } from "./router/guard/index.mjs";
|
|
52
|
+
import { createRoutePermissionStore as Lo } from "./store/router-permission.mjs";
|
|
53
|
+
import { createStorageWithNamespace as Fo } from "./bridge/storage.mjs";
|
|
54
|
+
import { createUseState as Oo } from "./bridge/state.mjs";
|
|
55
|
+
import { createUserStore as ho } from "./store/user.mjs";
|
|
56
|
+
import { flatRouteMetaResolveRaw as Bo, getRoutePermissionKey as bo } from "./utils/router.mjs";
|
|
57
|
+
import { getId as Go } from "./utils/id.mjs";
|
|
58
|
+
import { timeCountDown as Vo } from "./utils/time.mjs";
|
|
59
|
+
import { useActivated as wo, useActivatedEvent as Yo, useActivatedExec as vo } from "./hooks/activated.mjs";
|
|
60
|
+
import { useBreakpoint as Ho } from "./hooks/use-breakpoint.mjs";
|
|
61
|
+
import { useChannelViewportHeight as Wo } from "./hooks/use-channel-viewport-height.mjs";
|
|
62
|
+
import { useFeelSize as Xo } from "./hooks/feel-size.mjs";
|
|
63
|
+
import { useMenusDataDispatch as Qo } from "./hooks/menus-dispatch.mjs";
|
|
64
|
+
import { useTimeout as Jo } from "./hooks/timeout.mjs";
|
|
63
65
|
export {
|
|
64
66
|
k as APP_API_LIST_MODEL_KEY_CONFIG,
|
|
65
67
|
z as APP_LAYOUT_APP_STORE_KEY,
|
|
@@ -79,78 +81,80 @@ export {
|
|
|
79
81
|
_e as AutoRefreshGroup,
|
|
80
82
|
Q as BODY_CONTENT_VIEWPORT_HEIGHT,
|
|
81
83
|
u as BooleanTag,
|
|
82
|
-
|
|
84
|
+
Se as ConfirmModal,
|
|
83
85
|
l as DetailModal,
|
|
84
86
|
Te as EXPORT_MAX_LIMIT,
|
|
85
|
-
|
|
87
|
+
Fe as FORM_CONFIG_SELECT_ALL_VALUE,
|
|
86
88
|
De as FORM_ITEM_CHANGE_LOADING,
|
|
87
89
|
d as FormMain,
|
|
88
90
|
n as FormRadioGroup,
|
|
89
91
|
ze as FormSearch,
|
|
90
92
|
c as FormSelect,
|
|
91
|
-
E as
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
g as
|
|
95
|
-
qe as
|
|
96
|
-
L as
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
E as FormSubmitBtn,
|
|
94
|
+
je as FormSubmitPanel,
|
|
95
|
+
P as FormTree,
|
|
96
|
+
g as FormVerifyCode,
|
|
97
|
+
qe as FormVerifyImage,
|
|
98
|
+
L as HeightProvider,
|
|
99
|
+
Ze as ListPage,
|
|
100
|
+
F as MenuItemSub,
|
|
101
|
+
O as MenuTree,
|
|
102
|
+
h as ModalPorter,
|
|
103
|
+
B as ModalShelf,
|
|
100
104
|
ge as OPERATE_COLUMN_PROP,
|
|
101
|
-
|
|
105
|
+
eo as PanelEditSwitch,
|
|
102
106
|
y as PanelItem,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
107
|
+
ro as PanelMain,
|
|
108
|
+
ao as ROUTE_MODULE_LEVEL,
|
|
109
|
+
U as SelectModule,
|
|
106
110
|
q as TABS_MAIN_VISUAL_LEVEL,
|
|
107
|
-
|
|
111
|
+
po as TableMain,
|
|
108
112
|
N as TabsMain,
|
|
109
|
-
|
|
113
|
+
fo as TabsMainReplaceQueryKey,
|
|
110
114
|
Y as TriggerAutoImport,
|
|
111
115
|
K as WatchSize,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
116
|
+
so as checkLogin,
|
|
117
|
+
xo as checkPermission,
|
|
118
|
+
no as countAll,
|
|
115
119
|
r as createAdminBridge,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
Eo as createAppStore,
|
|
121
|
+
Po as createGenerateRouteMetaRawTree,
|
|
122
|
+
go as createGuard,
|
|
123
|
+
Ao as createListApi,
|
|
124
|
+
Lo as createRoutePermissionStore,
|
|
125
|
+
Fo as createStorageWithNamespace,
|
|
126
|
+
Oo as createUseState,
|
|
127
|
+
ho as createUserStore,
|
|
124
128
|
Me as exportCSV,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
co as fetchListAll,
|
|
130
|
+
Bo as flatRouteMetaResolveRaw,
|
|
131
|
+
Be as generateFormData,
|
|
132
|
+
be as getBlurSubmit,
|
|
133
|
+
ye as getChangeSubmit,
|
|
134
|
+
Ie as getConfirmPasswordRule,
|
|
135
|
+
Ge as getDatePickerShortcuts,
|
|
136
|
+
Ue as getEnterSubmit,
|
|
137
|
+
Go as getId,
|
|
134
138
|
J as getModalShelfInjectionKey,
|
|
135
|
-
|
|
136
|
-
|
|
139
|
+
Ve as getPlaceholder,
|
|
140
|
+
bo as getRoutePermissionKey,
|
|
137
141
|
Ne as getVModelSugar,
|
|
138
142
|
we as parseFormData,
|
|
139
|
-
|
|
143
|
+
Oe as passwordRule,
|
|
140
144
|
Le as pickExportColumns,
|
|
141
145
|
Ye as resolveFormLayout,
|
|
142
|
-
|
|
146
|
+
Ce as setFormComponentType,
|
|
143
147
|
ve as setInputComponent,
|
|
144
148
|
Ke as setSelectComponent,
|
|
145
149
|
He as stringifyFormData,
|
|
146
150
|
ke as swiftFormItemConfig,
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
151
|
+
Vo as timeCountDown,
|
|
152
|
+
wo as useActivated,
|
|
153
|
+
Yo as useActivatedEvent,
|
|
154
|
+
vo as useActivatedExec,
|
|
155
|
+
Ho as useBreakpoint,
|
|
156
|
+
Wo as useChannelViewportHeight,
|
|
157
|
+
Xo as useFeelSize,
|
|
158
|
+
Qo as useMenusDataDispatch,
|
|
159
|
+
Jo as useTimeout
|
|
156
160
|
};
|
package/es/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.confirm-dialog .content[data-v-8a29e4c8]{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 200px)}.confirm-dialog .btn[data-v-8a29e4c8]{width:150px;height:40px;border-radius:4px}.confirm-dialog .main[data-v-8a29e4c8]{position:relative;text-align:center}.confirm-dialog .main .close-box[data-v-8a29e4c8]{position:absolute;top:0;right:0;cursor:pointer;z-index:2}.confirm-dialog .main .shim[data-v-8a29e4c8]{position:relative;z-index:1}.confirm-dialog .main .shim .title[data-v-8a29e4c8]{font-size:18px;font-weight:500}.confirm-dialog .main .shim .content[data-v-8a29e4c8]{font-size:16px;margin-top:15px}.confirm-dialog .main .shim .footer[data-v-8a29e4c8]{display:flex;justify-content:center;align-items:center;padding-top:5px}.confirm-dialog .main .shim .footer>.btn[data-v-8a29e4c8]:not(:last-child){margin-right:30px}.confirm-dialog .main .shim .footer[reverse=true][data-v-8a29e4c8]{flex-direction:row-reverse}.confirm-dialog .main .shim .footer[reverse=true]>.btn[data-v-8a29e4c8]:not(:last-child){margin-right:0;margin-left:30px}.confirm-dialog .el-dialog__header,.confirm-dialog .el-dialog__body{padding:0;background-color:transparent}.action-confirm__title[data-v-5bb407c9]{font-weight:600;margin-bottom:6px}.action-confirm__content[data-v-5bb407c9]{margin-bottom:12px;color:var(--el-text-color-regular)}.action-confirm__actions[data-v-5bb407c9]{display:flex;justify-content:flex-end;gap:8px}.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}.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}.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-d6937179]{position:relative;display:flex;align-items:center}.tabs-main-bar-item[data-v-d6937179]{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-d6937179]{position:absolute;left:0;background:var(--el-color-primary);transition:transform .2s,width .2s}.tabs-main-bar--l1 .tabs-main-bar-item[data-v-d6937179]{font-size:16px}.tabs-main-bar--l2 .tabs-main-bar-item[data-v-d6937179]{font-size:14px}.tabs-main-bar--l3 .tabs-main-bar-item[data-v-d6937179],.tabs-main-bar--l4 .tabs-main-bar-item[data-v-d6937179]{font-size:12px}.tabs-main-bar--variant-card[data-v-d6937179]{position:relative;overflow:hidden;gap:2px}.tabs-main-bar--variant-card .tabs-main-bar-item[data-v-d6937179]{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-d6937179]:hover:not(.tabs-main-bar-item_active){color:var(--el-color-primary)}.tabs-main-bar--variant-card .tabs-main-bar-item_active[data-v-d6937179]{color:var(--el-color-primary);border-color:var(--el-border-color-light)}.tabs-main-bar--variant-card .tabs-main-bar-item_active[data-v-d6937179]:before,.tabs-main-bar--variant-card .tabs-main-bar-item_active[data-v-d6937179]: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-d6937179]:before{right:100%}.tabs-main-bar--variant-card .tabs-main-bar-item_active[data-v-d6937179]:after{left:100%}.tabs-main-bar--variant-indicator .tabs-main-bar-item[data-v-d6937179]{padding:8px 16px}.tabs-main-bar--variant-indicator .tabs-main-bar-item_active[data-v-d6937179]{color:var(--el-color-primary)}.tabs-main-bar--variant-indicator .tabs-main-bar-indicator[data-v-d6937179]{bottom:0;height:2px}.tabs-main-bar--variant-indicator-compact .tabs-main-bar-item[data-v-d6937179]{padding:6px 10px}.tabs-main-bar--variant-indicator-compact .tabs-main-bar-item_active[data-v-d6937179]{color:var(--el-color-primary)}.tabs-main-bar--variant-indicator-compact .tabs-main-bar-indicator[data-v-d6937179]{bottom:0;height:1px}.tabs-main-bar--variant-plain .tabs-main-bar-item[data-v-d6937179]{padding:4px 8px}.tabs-main-bar--variant-plain .tabs-main-bar-item_active[data-v-d6937179]{color:var(--el-color-primary);font-weight:600}.app-breadcrumb[data-v-2f677890]{display:flex;align-items:center;justify-content:flex-start}.app-body[data-v-265945fd]{transition-duration:.3s;transition-property:padding;transition-timing-function:linear;min-height:100vh}.app-body-shim[data-v-265945fd]{width:100%;--app-viewport-max-height: var(--ba2eb370)}.app-footer[data-v-393d9768]{transition-duration:.3s;transition-property:height;transition-timing-function:linear;overflow:hidden;width:100%;box-shadow:-5px 0 5px #0000001a}.app-footer-shim[data-v-393d9768]{width:100%;height:100%;padding:0 20px}.app-header[data-v-ef3cc8a6]{transition-duration:.3s;transition-property:height;transition-timing-function:linear;overflow:hidden;position:fixed;left:0;top:0;width:100%;box-shadow:5px 0 5px #0000001a;z-index:1}.app-header-module[data-v-ef3cc8a6]{display:flex;flex:1;height:100%;overflow-x:auto}.app-header-module-item[data-v-ef3cc8a6]{display:flex;justify-content:center;align-items:center;padding:0 20px;white-space:nowrap;height:100%;color:var(--v3dfae5bc)}.app-header-module-item[data-v-ef3cc8a6]:hover,.app-header-module-item_active[data-v-ef3cc8a6]{color:var(--v158cd0d2)}.app-header-module-item_active[data-v-ef3cc8a6]{position:relative}.app-header-module-item_active[data-v-ef3cc8a6]:before{content:"";position:absolute;left:50%;top:0;width:100%;height:3px;background-color:var(--v158cd0d2);transform:translate(-50%)}.app-header-shim[data-v-ef3cc8a6]{width:100%;height:100%;display:flex;align-items:center;justify-content:space-between;padding:0 20px;font-size:18px;font-weight:700}.app-header-module-item__icon[data-v-ef3cc8a6]{margin-right:8px}.app-header-userInfo[data-v-ef3cc8a6]{padding-left:80px}.app-header-userInfo__theme-switch[data-v-ef3cc8a6]{margin-right:12px}.app-sidebar[data-v-37ff5e0c]{transition-duration:.3s;transition-property:width;transition-timing-function:linear;position:fixed;left:0;top:0;height:100%;box-shadow:0 5px 5px #0000001a;overflow:visible;z-index:var(--ce9ef212)}.app-sidebar-top[data-v-37ff5e0c]{position:absolute;left:0;right:0;top:0;overflow:hidden}.app-sidebar-bottom[data-v-37ff5e0c]{position:absolute;left:0;right:0;bottom:0;overflow:hidden}.app-sidebar-shim[data-v-37ff5e0c]{position:absolute;left:0;right:0;top:var(--v309db2c2);bottom:var(--v2189b8a1);overflow-x:hidden;overflow-y:auto;--el-menu-border-color: transparent;-webkit-user-select:none;user-select:none}.app-sidebar-toggle[data-v-37ff5e0c]{position:absolute;left:100%;top:50%;transform:translate(-50%,-50%);cursor:pointer;width:22px;height:22px;border-radius:50%;background-color:var(--v65908f82);color:var(--v42a24063);border:1px solid var(--v42a24063);box-shadow:0 1px 2px #0000000f;display:flex;align-items:center;justify-content:center;font-size:12px;z-index:1;isolation:isolate;transition:color .3s,border-color .3s,box-shadow .3s}.app-sidebar-toggle[data-v-37ff5e0c]:before{content:"";position:absolute;top:-3px;right:-3px;bottom:-3px;left:-3px;border-radius:50%;background-color:var(--v42a24063);opacity:.18;z-index:-1;pointer-events:none;transition:opacity .3s,inset .3s}.app-sidebar-toggle[data-v-37ff5e0c]:active,.app-sidebar-toggle[data-v-37ff5e0c]:focus,.app-sidebar-toggle[data-v-37ff5e0c]:hover{box-shadow:0 2px 6px #0000001f}.app-sidebar-toggle[data-v-37ff5e0c]:active:before,.app-sidebar-toggle[data-v-37ff5e0c]:focus:before,.app-sidebar-toggle[data-v-37ff5e0c]:hover:before{opacity:.32;top:-5px;right:-5px;bottom:-5px;left:-5px}.app-sidebar-toggle-icon[data-v-37ff5e0c]{transition:transform .3s}.app-layout[data-v-6924f8b7]{position:relative}.app-layout_noLogin[data-v-6924f8b7] .app-body,.app-layout_noLogin[data-v-6924f8b7] .app-sidebar,.app-layout_noLogin[data-v-6924f8b7] .app-header,.app-layout_noLogin[data-v-6924f8b7] .app-footer{transition:none!important}.app-page-shim[data-v-fda19616]{--app-viewport-max-height: var(--v54888f0e)}[data-v-1f8a1089] .auto-refresh-label{display:flex;font-size:13px;color:var(--el-text-color-regular);margin-bottom:8px}.auto-refresh-group-icon--rotating[data-v-9cac8b09]{animation:auto-refresh-rotating-9cac8b09 1s linear infinite}@keyframes auto-refresh-rotating-9cac8b09{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.table-toolbar[data-v-22ae8fa7]{display:flex;justify-content:space-between;align-items:center;padding-bottom:8px;gap:20px}.table-toolbar-left[data-v-22ae8fa7],.table-toolbar-right[data-v-22ae8fa7]{display:flex;align-items:center;gap:10px}.table-toolbar-switch-view[data-v-22ae8fa7]{--el-switch-off-color: var(--el-color-primary);--el-switch-on-color: var(--el-color-warning)}.data-list-view[data-v-da38bea6]{width:100%}.data-list-view-empty[data-v-da38bea6]{display:flex;justify-content:center;align-items:center;width:100%;min-height:60px}.table-main-pagination[data-v-05684b89]{margin-top:10px;display:flex;justify-content:flex-end}.list-page[data-v-d70424b6]{min-height:var(--v9299b0d4)}.list-page-header[data-v-d70424b6],.list-page-operation[data-v-d70424b6]{margin-bottom:10px}.list-page[data-v-d70424b6] .el-loading-mask{left:-10px;top:-10px;right:-10px;bottom:-10px}
|
|
1
|
+
.confirm-dialog .content[data-v-8a29e4c8]{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 200px)}.confirm-dialog .btn[data-v-8a29e4c8]{width:150px;height:40px;border-radius:4px}.confirm-dialog .main[data-v-8a29e4c8]{position:relative;text-align:center}.confirm-dialog .main .close-box[data-v-8a29e4c8]{position:absolute;top:0;right:0;cursor:pointer;z-index:2}.confirm-dialog .main .shim[data-v-8a29e4c8]{position:relative;z-index:1}.confirm-dialog .main .shim .title[data-v-8a29e4c8]{font-size:18px;font-weight:500}.confirm-dialog .main .shim .content[data-v-8a29e4c8]{font-size:16px;margin-top:15px}.confirm-dialog .main .shim .footer[data-v-8a29e4c8]{display:flex;justify-content:center;align-items:center;padding-top:5px}.confirm-dialog .main .shim .footer>.btn[data-v-8a29e4c8]:not(:last-child){margin-right:30px}.confirm-dialog .main .shim .footer[reverse=true][data-v-8a29e4c8]{flex-direction:row-reverse}.confirm-dialog .main .shim .footer[reverse=true]>.btn[data-v-8a29e4c8]:not(:last-child){margin-right:0;margin-left:30px}.confirm-dialog .el-dialog__header,.confirm-dialog .el-dialog__body{padding:0;background-color:transparent}.action-confirm__title[data-v-88119b35]{font-weight:600;margin-bottom:6px}.action-confirm__content[data-v-88119b35]{margin-bottom:12px;color:var(--el-text-color-regular)}.action-confirm__actions[data-v-88119b35]{display:flex;justify-content:flex-end;gap:8px}.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-submit-panel[data-v-90ab06ac]{display:flex;flex-direction:column}.form-submit-panel .form-submit-panel-form[data-v-90ab06ac]{order:1}.form-submit-panel .form-submit-panel-operation[data-v-90ab06ac]{order:2}.form-submit-panel .form-submit-panel-operation-inner[data-v-90ab06ac]{display:flex;align-items:center;gap:8px;padding:10px 12px}.form-submit-panel .el-affix--fixed .form-submit-panel-operation-inner[data-v-90ab06ac]{background-color:var(--el-bg-color)}.form-submit-panel_bottom-center .form-submit-panel-operation-inner[data-v-90ab06ac],.form-submit-panel_bottom-right .form-submit-panel-operation-inner[data-v-90ab06ac]{border-top:1px solid var(--el-border-color-light);border-bottom-left-radius:var(--el-border-radius-base);border-bottom-right-radius:var(--el-border-radius-base)}.form-submit-panel_bottom-center .form-submit-panel-operation-inner[data-v-90ab06ac]{justify-content:center}.form-submit-panel_bottom-right .form-submit-panel-operation-inner[data-v-90ab06ac]{justify-content:flex-end}.form-submit-panel_top-right .form-submit-panel-operation[data-v-90ab06ac]{order:0}.form-submit-panel_top-right .form-submit-panel-operation-inner[data-v-90ab06ac]{justify-content:flex-end;border-bottom:1px solid var(--el-border-color-light);border-top-left-radius:var(--el-border-radius-base);border-top-right-radius:var(--el-border-radius-base)}.panel-edit-switch[data-v-5b38b68e]{position:relative}.panel-edit-switch:hover .panel-edit-switch-edit-btn[data-v-5b38b68e]{display:block}.panel-edit-switch-edit-btn[data-v-5b38b68e]{position:absolute;top:0;right:0;z-index:1;display:none}.panel-edit-switch-actions[data-v-5b38b68e]{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}.form-search_show[data-v-d240f220]{margin-bottom:10px}.form-search .btn-box[data-v-d240f220]{display:flex;align-items:center;gap:8px;justify-content:flex-end}.form-search .btn-box-expand-icon[data-v-d240f220]{margin-right:2px}.form-search[data-v-d240f220] .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-d6937179]{position:relative;display:flex;align-items:center}.tabs-main-bar-item[data-v-d6937179]{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-d6937179]{position:absolute;left:0;background:var(--el-color-primary);transition:transform .2s,width .2s}.tabs-main-bar--l1 .tabs-main-bar-item[data-v-d6937179]{font-size:16px}.tabs-main-bar--l2 .tabs-main-bar-item[data-v-d6937179]{font-size:14px}.tabs-main-bar--l3 .tabs-main-bar-item[data-v-d6937179],.tabs-main-bar--l4 .tabs-main-bar-item[data-v-d6937179]{font-size:12px}.tabs-main-bar--variant-card[data-v-d6937179]{position:relative;overflow:hidden;gap:2px}.tabs-main-bar--variant-card .tabs-main-bar-item[data-v-d6937179]{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-d6937179]:hover:not(.tabs-main-bar-item_active){color:var(--el-color-primary)}.tabs-main-bar--variant-card .tabs-main-bar-item_active[data-v-d6937179]{color:var(--el-color-primary);border-color:var(--el-border-color-light)}.tabs-main-bar--variant-card .tabs-main-bar-item_active[data-v-d6937179]:before,.tabs-main-bar--variant-card .tabs-main-bar-item_active[data-v-d6937179]: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-d6937179]:before{right:100%}.tabs-main-bar--variant-card .tabs-main-bar-item_active[data-v-d6937179]:after{left:100%}.tabs-main-bar--variant-indicator .tabs-main-bar-item[data-v-d6937179]{padding:8px 16px}.tabs-main-bar--variant-indicator .tabs-main-bar-item_active[data-v-d6937179]{color:var(--el-color-primary)}.tabs-main-bar--variant-indicator .tabs-main-bar-indicator[data-v-d6937179]{bottom:0;height:2px}.tabs-main-bar--variant-indicator-compact .tabs-main-bar-item[data-v-d6937179]{padding:6px 10px}.tabs-main-bar--variant-indicator-compact .tabs-main-bar-item_active[data-v-d6937179]{color:var(--el-color-primary)}.tabs-main-bar--variant-indicator-compact .tabs-main-bar-indicator[data-v-d6937179]{bottom:0;height:1px}.tabs-main-bar--variant-plain .tabs-main-bar-item[data-v-d6937179]{padding:4px 8px}.tabs-main-bar--variant-plain .tabs-main-bar-item_active[data-v-d6937179]{color:var(--el-color-primary);font-weight:600}.app-breadcrumb[data-v-2f677890]{display:flex;align-items:center;justify-content:flex-start}.app-body[data-v-265945fd]{transition-duration:.3s;transition-property:padding;transition-timing-function:linear;min-height:100vh}.app-body-shim[data-v-265945fd]{width:100%;--app-viewport-max-height: var(--ba2eb370)}.app-footer[data-v-393d9768]{transition-duration:.3s;transition-property:height;transition-timing-function:linear;overflow:hidden;width:100%;box-shadow:-5px 0 5px #0000001a}.app-footer-shim[data-v-393d9768]{width:100%;height:100%;padding:0 20px}.app-header[data-v-ef3cc8a6]{transition-duration:.3s;transition-property:height;transition-timing-function:linear;overflow:hidden;position:fixed;left:0;top:0;width:100%;box-shadow:5px 0 5px #0000001a;z-index:1}.app-header-module[data-v-ef3cc8a6]{display:flex;flex:1;height:100%;overflow-x:auto}.app-header-module-item[data-v-ef3cc8a6]{display:flex;justify-content:center;align-items:center;padding:0 20px;white-space:nowrap;height:100%;color:var(--v3dfae5bc)}.app-header-module-item[data-v-ef3cc8a6]:hover,.app-header-module-item_active[data-v-ef3cc8a6]{color:var(--v158cd0d2)}.app-header-module-item_active[data-v-ef3cc8a6]{position:relative}.app-header-module-item_active[data-v-ef3cc8a6]:before{content:"";position:absolute;left:50%;top:0;width:100%;height:3px;background-color:var(--v158cd0d2);transform:translate(-50%)}.app-header-shim[data-v-ef3cc8a6]{width:100%;height:100%;display:flex;align-items:center;justify-content:space-between;padding:0 20px;font-size:18px;font-weight:700}.app-header-module-item__icon[data-v-ef3cc8a6]{margin-right:8px}.app-header-userInfo[data-v-ef3cc8a6]{padding-left:80px}.app-header-userInfo__theme-switch[data-v-ef3cc8a6]{margin-right:12px}.app-sidebar[data-v-37ff5e0c]{transition-duration:.3s;transition-property:width;transition-timing-function:linear;position:fixed;left:0;top:0;height:100%;box-shadow:0 5px 5px #0000001a;overflow:visible;z-index:var(--ce9ef212)}.app-sidebar-top[data-v-37ff5e0c]{position:absolute;left:0;right:0;top:0;overflow:hidden}.app-sidebar-bottom[data-v-37ff5e0c]{position:absolute;left:0;right:0;bottom:0;overflow:hidden}.app-sidebar-shim[data-v-37ff5e0c]{position:absolute;left:0;right:0;top:var(--v309db2c2);bottom:var(--v2189b8a1);overflow-x:hidden;overflow-y:auto;--el-menu-border-color: transparent;-webkit-user-select:none;user-select:none}.app-sidebar-toggle[data-v-37ff5e0c]{position:absolute;left:100%;top:50%;transform:translate(-50%,-50%);cursor:pointer;width:22px;height:22px;border-radius:50%;background-color:var(--v65908f82);color:var(--v42a24063);border:1px solid var(--v42a24063);box-shadow:0 1px 2px #0000000f;display:flex;align-items:center;justify-content:center;font-size:12px;z-index:1;isolation:isolate;transition:color .3s,border-color .3s,box-shadow .3s}.app-sidebar-toggle[data-v-37ff5e0c]:before{content:"";position:absolute;top:-3px;right:-3px;bottom:-3px;left:-3px;border-radius:50%;background-color:var(--v42a24063);opacity:.18;z-index:-1;pointer-events:none;transition:opacity .3s,inset .3s}.app-sidebar-toggle[data-v-37ff5e0c]:active,.app-sidebar-toggle[data-v-37ff5e0c]:focus,.app-sidebar-toggle[data-v-37ff5e0c]:hover{box-shadow:0 2px 6px #0000001f}.app-sidebar-toggle[data-v-37ff5e0c]:active:before,.app-sidebar-toggle[data-v-37ff5e0c]:focus:before,.app-sidebar-toggle[data-v-37ff5e0c]:hover:before{opacity:.32;top:-5px;right:-5px;bottom:-5px;left:-5px}.app-sidebar-toggle-icon[data-v-37ff5e0c]{transition:transform .3s}.app-layout[data-v-6924f8b7]{position:relative}.app-layout_noLogin[data-v-6924f8b7] .app-body,.app-layout_noLogin[data-v-6924f8b7] .app-sidebar,.app-layout_noLogin[data-v-6924f8b7] .app-header,.app-layout_noLogin[data-v-6924f8b7] .app-footer{transition:none!important}.app-page-shim[data-v-fda19616]{--app-viewport-max-height: var(--v54888f0e)}[data-v-1f8a1089] .auto-refresh-label{display:flex;font-size:13px;color:var(--el-text-color-regular);margin-bottom:8px}.auto-refresh-group-icon--rotating[data-v-9cac8b09]{animation:auto-refresh-rotating-9cac8b09 1s linear infinite}@keyframes auto-refresh-rotating-9cac8b09{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.table-toolbar[data-v-22ae8fa7]{display:flex;justify-content:space-between;align-items:center;padding-bottom:8px;gap:20px}.table-toolbar-left[data-v-22ae8fa7],.table-toolbar-right[data-v-22ae8fa7]{display:flex;align-items:center;gap:10px}.table-toolbar-switch-view[data-v-22ae8fa7]{--el-switch-off-color: var(--el-color-primary);--el-switch-on-color: var(--el-color-warning)}.data-list-view[data-v-da38bea6]{width:100%}.data-list-view-empty[data-v-da38bea6]{display:flex;justify-content:center;align-items:center;width:100%;min-height:60px}.table-main-pagination[data-v-05684b89]{margin-top:10px;display:flex;justify-content:flex-end}.list-page[data-v-d70424b6]{min-height:var(--v9299b0d4)}.list-page-header[data-v-d70424b6],.list-page-operation[data-v-d70424b6]{margin-bottom:10px}.list-page[data-v-d70424b6] .el-loading-mask{left:-10px;top:-10px;right:-10px;bottom:-10px}.panel-main-item-col:not(:last-of-type) .panel-main-item-col-wrap_card[data-v-5cd9d7e4]{margin-bottom:var(--v855b420c)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@done-coding/admin-core",
|
|
3
|
-
"version": "0.7.0",
|
|
3
|
+
"version": "0.7.1-alpha.0",
|
|
4
4
|
"description": "后台管理核心",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "lib/index.cjs",
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
"serve": "vite",
|
|
26
26
|
"predev": "dc-inject",
|
|
27
27
|
"dev": "vite build -w -m hotBuild",
|
|
28
|
+
"prehotBuild": "dc-inject",
|
|
29
|
+
"hotBuild": "vite build -w",
|
|
28
30
|
"prebuild": "dc-inject",
|
|
29
31
|
"build": "vue-tsc && vite build",
|
|
30
32
|
"build:test": "pnpm run build",
|
|
@@ -79,5 +81,5 @@
|
|
|
79
81
|
"node": ">=18.0.0",
|
|
80
82
|
"pnpm": ">=9.0.0"
|
|
81
83
|
},
|
|
82
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "6c5fb5f9b618d2ffb6c0af50c81fb8912e659501"
|
|
83
85
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { default as WatchSize } from './WatchSize.vue';
|
|
2
2
|
import { default as TabsMain } from './TabsMain.vue';
|
|
3
3
|
import { default as HeightProvider } from './HeightProvider.vue';
|
|
4
|
+
import { default as ActionBtn } from './ActionBtn.vue';
|
|
5
|
+
import { default as ActionConfirm } from './ActionConfirm.vue';
|
|
4
6
|
import { default as ActionBtnGroup } from './ActionBtnGroup.vue';
|
|
5
7
|
import { default as BooleanTag } from './BooleanTag.vue';
|
|
6
8
|
export {
|
|
@@ -17,6 +19,16 @@ TabsMain,
|
|
|
17
19
|
* 消费方 [MUST] 用 slot scope `:height` 自设容器高。
|
|
18
20
|
*/
|
|
19
21
|
HeightProvider,
|
|
22
|
+
/**
|
|
23
|
+
* ElButton 超集按钮原语:透传全 ElButton props + 默认槽 label + `confirmConfig`
|
|
24
|
+
* 确认闸门 + `beforeOpen` 异步预取 + onClick 返 Promise 自动 loading(内部接管)。
|
|
25
|
+
*/
|
|
26
|
+
ActionBtn,
|
|
27
|
+
/**
|
|
28
|
+
* confirm 原语(扁平,可独立于 ActionBtn 消费):触发元素由默认 slot 提供,
|
|
29
|
+
* 弹层可见性 `v-model:show` 声明式驱动;`submitFn` 返 Promise 时仅成功才关弹层。
|
|
30
|
+
*/
|
|
31
|
+
ActionConfirm,
|
|
20
32
|
/**
|
|
21
33
|
* 配置式按钮组(泛型 Ctx 由消费方决定形状)。
|
|
22
34
|
* - 二选一渲染:`actionBtnProps`(走 ActionBtn 带 confirm/beforeOpen)优先 / `props`(走 ElButton)。
|
|
@@ -1,5 +1,91 @@
|
|
|
1
1
|
import { Component, ComputedRef, VNode } from 'vue';
|
|
2
|
-
import { TagProps } from 'element-plus';
|
|
2
|
+
import { ButtonProps, TagProps } from 'element-plus';
|
|
3
|
+
/** ActionConfirm 确认交互形态:弹层气泡 / 居中模态框 */
|
|
4
|
+
export type ActionConfirmMode = "popconfirm" | "messageConfirm";
|
|
5
|
+
/**
|
|
6
|
+
* ActionConfirm 文案解析器。
|
|
7
|
+
* - string:直接渲染
|
|
8
|
+
* - 无参函数:返回字符串或 VNode 数组(富文本);动态数据由调用方闭包捕获
|
|
9
|
+
*/
|
|
10
|
+
export type ActionConfirmTextResolver = string | (() => string | VNode[]);
|
|
11
|
+
/**
|
|
12
|
+
* ActionBtn 的确认配置(嵌套对象;无此配置则为普通按钮,不触发确认)。
|
|
13
|
+
*
|
|
14
|
+
* ⚠️ 瞬时用户激活限制:`confirmConfig` 与 `beforeOpen` 均会异步打断点击的瞬时
|
|
15
|
+
* 用户激活窗口(transient user activation)——confirm 后 / beforeOpen 之后的
|
|
16
|
+
* handler 与原始点击之间隔了一次异步等待,原始激活此时已过期(注意:事件对象
|
|
17
|
+
* `isTrusted` 仍为 true,失效的是激活窗口而非事件本身)。故 confirm 后 /
|
|
18
|
+
* beforeOpen 之后的 handler [MUST NOT] 调用依赖瞬时用户激活的 API——
|
|
19
|
+
* `window.open`、`navigator.clipboard.*`、`requestFullscreen` 等会被浏览器
|
|
20
|
+
* 拦截。需要这类操作时改用无 `confirmConfig` 且无 `beforeOpen` 的 ActionBtn /
|
|
21
|
+
* 普通按钮。此为 confirm-gate / async-prefetch 模式固有代价,组件层无法绕过。
|
|
22
|
+
*/
|
|
23
|
+
export interface ActionBtnConfirmConfig {
|
|
24
|
+
/** 确认标题 */
|
|
25
|
+
title?: ActionConfirmTextResolver;
|
|
26
|
+
/** 确认正文内容 */
|
|
27
|
+
content?: ActionConfirmTextResolver;
|
|
28
|
+
/** 确认按钮文案,默认"确定" */
|
|
29
|
+
confirmText?: string;
|
|
30
|
+
/** 取消按钮文案,默认"取消" */
|
|
31
|
+
cancelText?: string;
|
|
32
|
+
/** 确认按钮 type */
|
|
33
|
+
type?: ButtonProps["type"];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* ActionBtn 组件 props。
|
|
37
|
+
* 完全兼容 ElButton(继承 ButtonProps),仅一处改写 + 三个增量:
|
|
38
|
+
* - `loading` 被 Omit:有意的 ElButton 不兼容,唯一接管项——loading 由组件内部
|
|
39
|
+
* 独占,对接异步 confirm / beforeOpen 的进行态(innerLoading),对外不可设置。
|
|
40
|
+
* - `disabled` 原生透传,不改写不扩展。
|
|
41
|
+
* - 增量:`confirmMode` / `confirmConfig` / `beforeOpen`。
|
|
42
|
+
* - 泛型 `T`:由 `beforeOpen` 返回值反推,并透传给 `confirmConfig` 函数形态的
|
|
43
|
+
* 入参;未传 `beforeOpen` 时默认 `T = void`,函数形态的 `data = undefined`。
|
|
44
|
+
*/
|
|
45
|
+
export type ActionBtnProps<T = void> = Omit<ButtonProps, "loading"> & {
|
|
46
|
+
/** 确认交互形态,仅在 confirmConfig 存在时生效,默认 "popconfirm" */
|
|
47
|
+
confirmMode?: ActionConfirmMode;
|
|
48
|
+
/**
|
|
49
|
+
* 确认配置;存在时点击需经确认闸门,确认后才触发 click。
|
|
50
|
+
* - 对象形态:静态确认配置(向后兼容)。
|
|
51
|
+
* - 函数形态:`(data: T) => ActionBtnConfirmConfig`,`data` 来自 `beforeOpen`
|
|
52
|
+
* 返回值;无 `beforeOpen` 时 `data = undefined`(T 默认 `void`)。
|
|
53
|
+
*/
|
|
54
|
+
confirmConfig?: ActionBtnConfirmConfig | ((data: T) => ActionBtnConfirmConfig);
|
|
55
|
+
/**
|
|
56
|
+
* 点击后、弹层前的异步预取钩子。
|
|
57
|
+
* - 返回值类型 `T` 反推给 `confirmConfig` 函数形态的入参。
|
|
58
|
+
* - 失败时静默退出(不弹层、不触发 `@click` handler);调用方 [MUST] 在内部
|
|
59
|
+
* 自行 catch 并显示反馈(如 `ElMessage.error`),忘记 catch 会"点了没反应"。
|
|
60
|
+
* - 期间按钮显 loading 态(`innerLoading`);同 `confirmConfig` 一样消耗
|
|
61
|
+
* 瞬时用户激活(详见 {@link ActionBtnConfirmConfig} 顶部注释)。
|
|
62
|
+
*/
|
|
63
|
+
beforeOpen?: () => Promise<T>;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* ActionConfirm 组件 props(扁平,confirm 原语;可独立于 ActionBtn 消费)。
|
|
67
|
+
* 触发元素由默认 slot 提供;弹层可见性由 `v-model:show` 声明式驱动。
|
|
68
|
+
*/
|
|
69
|
+
export interface ActionConfirmProps {
|
|
70
|
+
/** 确认交互形态 */
|
|
71
|
+
mode: ActionConfirmMode;
|
|
72
|
+
/** 确认标题 */
|
|
73
|
+
title?: ActionConfirmTextResolver;
|
|
74
|
+
/** 确认正文内容 */
|
|
75
|
+
content?: ActionConfirmTextResolver;
|
|
76
|
+
/** 确认按钮文案,默认"确定" */
|
|
77
|
+
confirmText?: string;
|
|
78
|
+
/** 取消按钮文案,默认"取消" */
|
|
79
|
+
cancelText?: string;
|
|
80
|
+
/** 确认按钮 type */
|
|
81
|
+
type?: ButtonProps["type"];
|
|
82
|
+
/**
|
|
83
|
+
* 点击确认后调用。返回 Promise 时确认按钮 loading + 弹层保持不关,
|
|
84
|
+
* **仅成功(fulfill)才关闭弹层**;失败(reject 或同步 throw)时清 loading、
|
|
85
|
+
* 弹层保持打开,错误由 `submitFn` 内部自行 catch 反馈。
|
|
86
|
+
*/
|
|
87
|
+
submitFn: () => void | Promise<void>;
|
|
88
|
+
}
|
|
3
89
|
/** ActionBtnGroup 按钮 size 枚举(对齐 element-plus ElButton size) */
|
|
4
90
|
export type ActionBtnSize = "large" | "default" | "small";
|
|
5
91
|
/**
|
|
@@ -89,7 +89,7 @@ declare function __VLS_template(): {
|
|
|
89
89
|
labelPosition: "left" | "right" | "top" | "";
|
|
90
90
|
inlineMessage: boolean;
|
|
91
91
|
showMessage: boolean;
|
|
92
|
-
}> & Omit<Readonly<import('element-plus').FormItemProps> & Readonly<{}>, "labelPosition" | "required" | "inlineMessage" | "showMessage" | "size" | "
|
|
92
|
+
}> & Omit<Readonly<import('element-plus').FormItemProps> & Readonly<{}>, "labelPosition" | "required" | "inlineMessage" | "showMessage" | "size" | "validate" | "clearValidate" | "validateMessage" | "validateState" | "resetField" | "setInitialValue"> & {
|
|
93
93
|
size: "" | "default" | "small" | "large";
|
|
94
94
|
validateMessage: string;
|
|
95
95
|
validateState: "" | "error" | "validating" | "success";
|
|
@@ -194,7 +194,7 @@ declare const __VLS_component: import('vue').DefineComponent<FormMainItemProps,
|
|
|
194
194
|
labelPosition: "left" | "right" | "top" | "";
|
|
195
195
|
inlineMessage: boolean;
|
|
196
196
|
showMessage: boolean;
|
|
197
|
-
}> & Omit<Readonly<import('element-plus').FormItemProps> & Readonly<{}>, "labelPosition" | "required" | "inlineMessage" | "showMessage" | "size" | "
|
|
197
|
+
}> & Omit<Readonly<import('element-plus').FormItemProps> & Readonly<{}>, "labelPosition" | "required" | "inlineMessage" | "showMessage" | "size" | "validate" | "clearValidate" | "validateMessage" | "validateState" | "resetField" | "setInitialValue"> & {
|
|
198
198
|
size: "" | "default" | "small" | "large";
|
|
199
199
|
validateMessage: string;
|
|
200
200
|
validateState: "" | "error" | "validating" | "success";
|
|
@@ -6,7 +6,7 @@ declare const _default: <PO extends Record<string, any>, SO extends Record<strin
|
|
|
6
6
|
readonly onLoadingChange?: ((status: boolean) => any) | undefined;
|
|
7
7
|
readonly onVisibleChange?: ((status: boolean) => any) | undefined;
|
|
8
8
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onSubmit" | "onLoadingChange" | "onVisibleChange"> & FormMainProps<PO, SO> & Partial<{}>> & import('vue').PublicProps;
|
|
9
|
-
expose(exposed: import('vue').ShallowUnwrapRef<FormMainInstance
|
|
9
|
+
expose(exposed: import('vue').ShallowUnwrapRef<FormMainInstance<PO, SO>>): void;
|
|
10
10
|
attrs: any;
|
|
11
11
|
slots: Partial<Record<NonNullable<Extract<keyof PO, string>>, (_: {
|
|
12
12
|
onTriggerChangeLink: (n: any, attachInfo?: any) => void;
|
|
@@ -5,7 +5,7 @@ declare const _default: <PO extends Record<string, any>, SO extends Record<strin
|
|
|
5
5
|
readonly onVisibleChange?: ((status: boolean) => any) | undefined;
|
|
6
6
|
readonly onHeightChange?: ((height: number) => any) | undefined;
|
|
7
7
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onVisibleChange" | "onHeightChange" | "onSearch"> & FormSearchProps<PO, SO, SQ> & Partial<{}>> & import('vue').PublicProps;
|
|
8
|
-
expose(exposed: import('vue').ShallowUnwrapRef<FormSearchInstance
|
|
8
|
+
expose(exposed: import('vue').ShallowUnwrapRef<FormSearchInstance<PO, SO>>): void;
|
|
9
9
|
attrs: any;
|
|
10
10
|
slots: Partial<Record<NonNullable<Extract<keyof PO, string>>, (_: any) => any>>;
|
|
11
11
|
emit: {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FormDataInfo, FormSubmitBtnProps } from './types';
|
|
2
|
+
declare const _default: <PO extends Record<string, any>, SO extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
4
|
+
readonly onSuccess?: ((data: Pick<FormDataInfo<PO, SO>, "stringifyData">) => any) | undefined;
|
|
5
|
+
readonly onFail?: ((error: any) => any) | undefined;
|
|
6
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onSuccess" | "onFail"> & FormSubmitBtnProps<PO, SO> & Partial<{}>> & import('vue').PublicProps;
|
|
7
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
8
|
+
attrs: any;
|
|
9
|
+
slots: {};
|
|
10
|
+
emit: {
|
|
11
|
+
(e: "success", data: Pick<FormDataInfo<PO, SO>, "stringifyData">): void;
|
|
12
|
+
(e: "fail", error: any): void;
|
|
13
|
+
};
|
|
14
|
+
}>) => import('vue').VNode & {
|
|
15
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_PrettifyLocal<T> = {
|
|
19
|
+
[K in keyof T]: T[K];
|
|
20
|
+
} & {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AffixProps } from 'element-plus';
|
|
2
|
+
import { FormDataInfo } from './types';
|
|
3
|
+
declare const _default: <PO extends Record<string, any>, SO extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
|
+
readonly onSuccess?: ((info: FormDataInfo<PO, SO>) => any) | undefined;
|
|
6
|
+
readonly onReset?: ((initParseData: PO) => any) | undefined;
|
|
7
|
+
readonly onCancel?: (() => any) | undefined;
|
|
8
|
+
readonly onFail?: ((error: any) => any) | undefined;
|
|
9
|
+
readonly "onUpdate:parseData"?: ((value: PO) => any) | undefined;
|
|
10
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onReset" | "onCancel" | "onSuccess" | "onFail" | "onUpdate:parseData"> & ({
|
|
11
|
+
parseData?: PO;
|
|
12
|
+
} & Omit<import('./types').FormMainProps<PO, SO>, "data"> & {
|
|
13
|
+
stringifyData?: import('./types').ExcludeNeverProperties<import('./types').ExtractFormStringifyRawFromObject<PO, SO>> | undefined;
|
|
14
|
+
} & Pick<import('./types').FormSubmitBtnProps<PO, SO>, import('./types').FormSubmitPanelFlatProps> & {
|
|
15
|
+
submitBtnProps?: Omit<import('./types').FormSubmitBtnProps<PO, SO>, "formMainInstance" | import('./types').FormSubmitPanelFlatProps> | undefined;
|
|
16
|
+
} & {
|
|
17
|
+
labelPosition?: "right" | "left" | "top";
|
|
18
|
+
labelWidth?: string;
|
|
19
|
+
cancelBtn?: string;
|
|
20
|
+
resetBtn?: string;
|
|
21
|
+
operationPosition?: "bottom-center" | "bottom-right" | "top-right";
|
|
22
|
+
operationAffix?: boolean | AffixProps;
|
|
23
|
+
}) & Partial<{}>> & import('vue').PublicProps;
|
|
24
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
25
|
+
attrs: any;
|
|
26
|
+
slots: Partial<Record<NonNullable<Extract<keyof PO, string>>, (_: any) => any>> & {
|
|
27
|
+
cancelBtn?(_: {
|
|
28
|
+
cancel: () => void;
|
|
29
|
+
}): any;
|
|
30
|
+
resetBtn?(_: {
|
|
31
|
+
reset: () => void;
|
|
32
|
+
}): any;
|
|
33
|
+
};
|
|
34
|
+
emit: {
|
|
35
|
+
(e: "cancel"): void;
|
|
36
|
+
(e: "fail", error: any): void;
|
|
37
|
+
(e: "success", info: FormDataInfo<PO, SO>): void;
|
|
38
|
+
(e: "reset", initParseData: PO): void;
|
|
39
|
+
} & ((evt: "update:parseData", value: PO) => void);
|
|
40
|
+
}>) => import('vue').VNode & {
|
|
41
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
42
|
+
};
|
|
43
|
+
export default _default;
|
|
44
|
+
type __VLS_PrettifyLocal<T> = {
|
|
45
|
+
[K in keyof T]: T[K];
|
|
46
|
+
} & {};
|
|
@@ -3,8 +3,10 @@ import { default as FormSelect } from './FormSelect.vue';
|
|
|
3
3
|
import { default as FormRadioGroup } from './FormRadioGroup.vue';
|
|
4
4
|
import { default as FormTree } from './FormTree.vue';
|
|
5
5
|
import { default as FormSearch } from './FormSearch.vue';
|
|
6
|
+
import { default as FormSubmitBtn } from './FormSubmitBtn.vue';
|
|
7
|
+
import { default as FormSubmitPanel } from './FormSubmitPanel.vue';
|
|
6
8
|
import { default as FormVerifyImage } from './FormVerifyImage.vue';
|
|
7
9
|
import { default as FormVerifyCode } from './FormVerifyCode.vue';
|
|
8
10
|
export * from './types';
|
|
9
11
|
export * from './utils';
|
|
10
|
-
export { FormMain, FormSelect, FormSearch, FormRadioGroup, FormTree, FormVerifyImage, FormVerifyCode, };
|
|
12
|
+
export { FormMain, FormSelect, FormSearch, FormSubmitBtn, FormSubmitPanel, FormRadioGroup, FormTree, FormVerifyImage, FormVerifyCode, };
|