@done-coding/admin-core 0.0.1-alpha.0 → 0.0.1-alpha.2
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/TabsMain.vue.mjs +61 -0
- package/es/components/display/TabsMain.vue2.mjs +4 -0
- package/es/components/display/index.mjs +9 -7
- package/es/components/form/FormDateTimeRange.vue.mjs +46 -0
- package/es/components/form/FormDateTimeRange.vue2.mjs +4 -0
- package/es/components/form/FormMain.vue.mjs +65 -61
- package/es/components/form/FormRadio.vue.mjs +69 -0
- package/es/components/form/FormRadio.vue2.mjs +4 -0
- package/es/components/form/FormSearch.vue2.mjs +24 -23
- package/es/components/form/index.mjs +29 -23
- package/es/components/list-page/ListPage.vue.mjs +1 -1
- package/es/components/list-page/ListPage.vue2.mjs +107 -95
- package/es/components/misc/AutoRefresh.vue.mjs +7 -0
- package/es/components/misc/AutoRefresh.vue2.mjs +57 -0
- package/es/components/misc/index.mjs +7 -5
- package/es/components/modal/DetailModal.vue.mjs +31 -29
- package/es/components/table/TableMain.vue.mjs +2 -2
- package/es/components/table/TableMain.vue2.mjs +159 -118
- package/es/components/table/TableToolbar.vue.mjs +7 -0
- package/es/components/table/TableToolbar.vue2.mjs +75 -0
- package/es/config/route.mjs +3 -2
- package/es/helpers/list-helper.mjs +66 -0
- package/es/hooks/timeout.mjs +21 -0
- package/es/index.mjs +88 -73
- package/es/style.css +1 -1
- package/package.json +3 -3
- package/types/components/display/TabsMain.vue.d.ts +52 -0
- package/types/components/display/index.d.ts +2 -1
- package/types/components/form/FormDateTimeRange.vue.d.ts +18 -0
- package/types/components/form/FormMain.vue.d.ts +3 -0
- package/types/components/form/FormRadio.vue.d.ts +35 -0
- package/types/components/form/FormSearch.vue.d.ts +1 -1
- package/types/components/form/FormSelect.vue.d.ts +2 -6
- package/types/components/form/index.d.ts +3 -1
- package/types/components/form/types.d.ts +13 -0
- package/types/components/list-page/ListPage.vue.d.ts +18 -2
- package/types/components/misc/AutoRefresh.vue.d.ts +14 -0
- package/types/components/misc/index.d.ts +2 -1
- package/types/components/modal/ConfirmModal.vue.d.ts +1 -1
- package/types/components/modal/types.d.ts +2 -0
- package/types/components/table/TableMain.vue.d.ts +13 -1
- package/types/components/table/TableToolbar.vue.d.ts +43 -0
- package/types/components/table/types.d.ts +22 -2
- package/types/config/route.d.ts +2 -0
- package/types/helpers/index.d.ts +2 -0
- package/types/helpers/list-helper.d.ts +36 -0
- package/types/helpers/types.d.ts +15 -0
- package/types/hooks/index.d.ts +1 -0
- package/types/hooks/timeout.d.ts +7 -0
package/es/index.mjs
CHANGED
|
@@ -6,92 +6,107 @@ 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 { default as F } from "./components/modal/DetailModal.vue.mjs";
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as P } from "./components/
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { default as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { default as
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import { default as
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
9
|
+
import { default as E } from "./components/form/FormDateTimeRange.vue.mjs";
|
|
10
|
+
import { default as R } from "./components/form/FormMain.vue.mjs";
|
|
11
|
+
import { default as C } from "./components/form/FormRadio.vue.mjs";
|
|
12
|
+
import { default as S } from "./components/form/FormRadioGroup.vue.mjs";
|
|
13
|
+
import { default as D } from "./components/form/FormSelect.vue.mjs";
|
|
14
|
+
import { default as P } from "./components/form/FormTree.vue.mjs";
|
|
15
|
+
import { default as h } from "./components/form/FormVerifyCode.vue.mjs";
|
|
16
|
+
import { default as G } from "./components/menu/MenuItemSub.vue.mjs";
|
|
17
|
+
import { default as w } from "./components/menu/MenuTree.vue.mjs";
|
|
18
|
+
import { default as v } from "./components/display/TabsMain.vue.mjs";
|
|
19
|
+
import { default as H } from "./components/misc/TriggerAutoImport.vue.mjs";
|
|
20
|
+
import { default as W } from "./components/display/WatchSize.vue.mjs";
|
|
21
|
+
import { APP_API_LIST_MODEL_KEY_CONFIG as B } from "./config/list-model.mjs";
|
|
22
|
+
import { default as Q } from "./components/misc/AutoRefresh.vue.mjs";
|
|
23
|
+
import { BODY_CONTENT_VIEWPORT_HEIGHT as k } from "./inject/key.mjs";
|
|
24
|
+
import { default as J } from "./components/modal/ConfirmModal.vue.mjs";
|
|
25
|
+
import { FORM_CONFIG_SELECT_ALL_VALUE as Z, getConfirmPasswordRule as $, passwordRule as ee, setFormComponentType as te } from "./helpers/form.mjs";
|
|
26
|
+
import { FORM_ITEM_CHANGE_LOADING as re, generateFormData as ae, getBlurSubmit as me, getChangeSubmit as fe, getEnterSubmit as se, getPlaceholder as le, getVModelSugar as ue, parseFormData as ie, setInputComponent as pe, setSelectComponent as ne, stringifyFormData as xe, swiftFormItemConfig as de } from "./components/form/utils.mjs";
|
|
27
|
+
import { default as ce } from "./components/form/FormSearch.vue.mjs";
|
|
28
|
+
import { default as Fe } from "./components/form/FormVerifyImage.vue.mjs";
|
|
29
|
+
import { default as Ee } from "./components/list-page/ListPage.vue.mjs";
|
|
30
|
+
import { ROUTE_MODULE_LEVEL as Re, TabsMainReplaceQueryKey as _e } from "./config/route.mjs";
|
|
31
|
+
import { default as Ae } from "./components/table/TableMain.vue.mjs";
|
|
32
|
+
import { countAll as Le, createListApi as De, fetchListAll as Oe } from "./helpers/list-helper.mjs";
|
|
33
|
+
import { createGenerateRouteMetaRawTree as be } from "./helpers/route.mjs";
|
|
34
|
+
import { createStorageWithNamespace as ye } from "./helpers/storage.mjs";
|
|
35
|
+
import { createUseState as Ne } from "./helpers/state.mjs";
|
|
36
|
+
import { flatRouteMetaResolveRaw as Ve, getRoutePermissionKey as ve } from "./utils/router.mjs";
|
|
37
|
+
import { getId as He } from "./utils/id.mjs";
|
|
38
|
+
import { timeCountDown as We } from "./utils/time.mjs";
|
|
39
|
+
import { useActivated as Be, useActivatedEvent as Ye, useActivatedExec as Qe } from "./hooks/activated.mjs";
|
|
40
|
+
import { useFeelSize as ke } from "./hooks/feel-size.mjs";
|
|
41
|
+
import { useMenusDataDispatch as Je } from "./hooks/menus-dispatch.mjs";
|
|
42
|
+
import { useTimeout as Ze } from "./hooks/timeout.mjs";
|
|
37
43
|
const I = {
|
|
38
44
|
install(e) {
|
|
39
45
|
e.use(t), e.use(o), e.use(r), e.use(a), e.use(m), e.use(f), e.use(s);
|
|
40
46
|
}
|
|
41
47
|
};
|
|
42
48
|
export {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
B as APP_API_LIST_MODEL_KEY_CONFIG,
|
|
50
|
+
Q as AutoRefresh,
|
|
51
|
+
k as BODY_CONTENT_VIEWPORT_HEIGHT,
|
|
52
|
+
J as ConfirmModal,
|
|
46
53
|
F as DetailModal,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
54
|
+
Z as FORM_CONFIG_SELECT_ALL_VALUE,
|
|
55
|
+
re as FORM_ITEM_CHANGE_LOADING,
|
|
56
|
+
E as FormDateTimeRange,
|
|
57
|
+
R as FormMain,
|
|
58
|
+
C as FormRadio,
|
|
59
|
+
S as FormRadioGroup,
|
|
60
|
+
ce as FormSearch,
|
|
61
|
+
D as FormSelect,
|
|
62
|
+
P as FormTree,
|
|
63
|
+
h as FormVerifyCode,
|
|
64
|
+
Fe as FormVerifyImage,
|
|
65
|
+
Ee as ListPage,
|
|
66
|
+
G as MenuItemSub,
|
|
67
|
+
w as MenuTree,
|
|
68
|
+
Re as ROUTE_MODULE_LEVEL,
|
|
69
|
+
Ae as TableMain,
|
|
70
|
+
v as TabsMain,
|
|
71
|
+
_e as TabsMainReplaceQueryKey,
|
|
72
|
+
H as TriggerAutoImport,
|
|
73
|
+
W as WatchSize,
|
|
74
|
+
Le as countAll,
|
|
75
|
+
be as createGenerateRouteMetaRawTree,
|
|
76
|
+
De as createListApi,
|
|
77
|
+
ye as createStorageWithNamespace,
|
|
78
|
+
Ne as createUseState,
|
|
66
79
|
r as displayInstall,
|
|
67
|
-
|
|
80
|
+
Oe as fetchListAll,
|
|
81
|
+
Ve as flatRouteMetaResolveRaw,
|
|
68
82
|
t as formInstall,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
83
|
+
ae as generateFormData,
|
|
84
|
+
me as getBlurSubmit,
|
|
85
|
+
fe as getChangeSubmit,
|
|
86
|
+
$ as getConfirmPasswordRule,
|
|
87
|
+
se as getEnterSubmit,
|
|
88
|
+
He as getId,
|
|
89
|
+
le as getPlaceholder,
|
|
90
|
+
ve as getRoutePermissionKey,
|
|
91
|
+
ue as getVModelSugar,
|
|
78
92
|
I as installComponents,
|
|
79
93
|
s as listPageInstall,
|
|
80
94
|
o as menuInstall,
|
|
81
95
|
a as miscInstall,
|
|
82
96
|
m as modalInstall,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
97
|
+
ie as parseFormData,
|
|
98
|
+
ee as passwordRule,
|
|
99
|
+
te as setFormComponentType,
|
|
100
|
+
pe as setInputComponent,
|
|
101
|
+
ne as setSelectComponent,
|
|
102
|
+
xe as stringifyFormData,
|
|
103
|
+
de as swiftFormItemConfig,
|
|
90
104
|
f as tableInstall,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
105
|
+
We as timeCountDown,
|
|
106
|
+
Be as useActivated,
|
|
107
|
+
Ye as useActivatedEvent,
|
|
108
|
+
Qe as useActivatedExec,
|
|
109
|
+
ke as useFeelSize,
|
|
110
|
+
Je as useMenusDataDispatch,
|
|
111
|
+
Ze as useTimeout
|
|
97
112
|
};
|
package/es/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.form-item-tip[data-v-e889a0ed]{text-align:left;line-height:1.5;font-size:12px}.form-search_show[data-v-8896356d]{margin-bottom:10px}.form-search .btn-box[data-v-8896356d]{padding-left:20px}.form-search[data-v-8896356d] .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}.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-main-table[data-v-
|
|
1
|
+
.form-item-tip[data-v-e889a0ed]{text-align:left;line-height:1.5;font-size:12px}.form-search_show[data-v-8896356d]{margin-bottom:10px}.form-search .btn-box[data-v-8896356d]{padding-left:20px}.form-search[data-v-8896356d] .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}.auto-refresh[data-v-b734f05f]{display:flex;align-items:center;gap:8px}.auto-refresh-label[data-v-b734f05f]{font-size:13px;color:var(--el-text-color-regular)}.auto-refresh-interval[data-v-b734f05f]{width:80px}.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-4a425d38]{display:flex;justify-content:flex-end;align-items:center;padding-bottom:8px}.table-toolbar-right[data-v-4a425d38]{display:flex;align-items:center;gap:8px}.table-toolbar-icon--rotating[data-v-4a425d38]{animation:table-toolbar-rotating-4a425d38 1s linear infinite}@keyframes table-toolbar-rotating-4a425d38{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.table-main-table[data-v-5944984b]{--el-table-header-bg-color: var(--v7c6ca44f)}.table-main-pagination[data-v-5944984b]{margin-top:10px;display:flex;justify-content:flex-end}.list-page[data-v-a578c778]{min-height:var(--bb4a2a8e)}.list-page-operation[data-v-a578c778]{margin-bottom:10px}.list-page[data-v-a578c778] .el-loading-mask{left:-10px;top:-10px;right:-10px;bottom:-10px}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@done-coding/admin-core",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.2",
|
|
4
4
|
"description": "后台管理核心",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "lib/index.cjs",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"predev": "dc-inject",
|
|
27
27
|
"dev": "vite build -w -m hotBuild",
|
|
28
28
|
"prebuild": "dc-inject",
|
|
29
|
-
"build": "
|
|
29
|
+
"build": "vue-tsc && vite build",
|
|
30
30
|
"prepack": "pnpm build",
|
|
31
31
|
"test": "vitest",
|
|
32
32
|
"coverage": "vitest run --coverage"
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"node": ">=18.0.0",
|
|
78
78
|
"pnpm": ">=9.0.0"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "6773745c4582c3b167cd530b0cb8e550ff07aa3e"
|
|
81
81
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
declare function __VLS_template(): Partial<Record<`content-${string}`, (_: {
|
|
2
|
+
item: {
|
|
3
|
+
value: string;
|
|
4
|
+
title: string;
|
|
5
|
+
};
|
|
6
|
+
currentValue: string | undefined;
|
|
7
|
+
}) => any>>;
|
|
8
|
+
declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
9
|
+
modelValue: import('vue').PropType<string>;
|
|
10
|
+
list: {
|
|
11
|
+
type: globalThis.PropType<{
|
|
12
|
+
value: string;
|
|
13
|
+
title: string;
|
|
14
|
+
}[]>;
|
|
15
|
+
required: true;
|
|
16
|
+
};
|
|
17
|
+
replaceQuery: {
|
|
18
|
+
type: globalThis.PropType<boolean>;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
notNull: {
|
|
22
|
+
type: globalThis.PropType<boolean>;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
26
|
+
modelValue: import('vue').PropType<string>;
|
|
27
|
+
list: {
|
|
28
|
+
type: globalThis.PropType<{
|
|
29
|
+
value: string;
|
|
30
|
+
title: string;
|
|
31
|
+
}[]>;
|
|
32
|
+
required: true;
|
|
33
|
+
};
|
|
34
|
+
replaceQuery: {
|
|
35
|
+
type: globalThis.PropType<boolean>;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
notNull: {
|
|
39
|
+
type: globalThis.PropType<boolean>;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
}>> & Readonly<{}>, {
|
|
43
|
+
replaceQuery: boolean;
|
|
44
|
+
notNull: boolean;
|
|
45
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
46
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
47
|
+
export default _default;
|
|
48
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
49
|
+
new (): {
|
|
50
|
+
$slots: S;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DateTimeRangeSwiftOption } from './types';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
4
|
+
modelValue: import('vue').PropType<[Date, Date] | null>;
|
|
5
|
+
swiftOptions: {
|
|
6
|
+
type: globalThis.PropType<DateTimeRangeSwiftOption[]>;
|
|
7
|
+
default: () => never[];
|
|
8
|
+
};
|
|
9
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
10
|
+
modelValue: import('vue').PropType<[Date, Date] | null>;
|
|
11
|
+
swiftOptions: {
|
|
12
|
+
type: globalThis.PropType<DateTimeRangeSwiftOption[]>;
|
|
13
|
+
default: () => never[];
|
|
14
|
+
};
|
|
15
|
+
}>> & Readonly<{}>, {
|
|
16
|
+
swiftOptions: DateTimeRangeSwiftOption[];
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { OptionItem } from './types';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
4
|
+
modelValue: import('vue').PropType<OptionItem["value"]>;
|
|
5
|
+
list: {
|
|
6
|
+
type: globalThis.PropType<OptionItem[]>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
notNull: {
|
|
10
|
+
type: globalThis.PropType<boolean>;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
13
|
+
mode: {
|
|
14
|
+
type: globalThis.PropType<"radio" | "buttonGroup">;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
18
|
+
modelValue: import('vue').PropType<OptionItem["value"]>;
|
|
19
|
+
list: {
|
|
20
|
+
type: globalThis.PropType<OptionItem[]>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
notNull: {
|
|
24
|
+
type: globalThis.PropType<boolean>;
|
|
25
|
+
default: boolean;
|
|
26
|
+
};
|
|
27
|
+
mode: {
|
|
28
|
+
type: globalThis.PropType<"radio" | "buttonGroup">;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
}>> & Readonly<{}>, {
|
|
32
|
+
notNull: boolean;
|
|
33
|
+
mode: "radio" | "buttonGroup";
|
|
34
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
35
|
+
export default _default;
|
|
@@ -2,8 +2,8 @@ import { FormSearchInstance, FormSearchProps, FormSearchSearchType } from './typ
|
|
|
2
2
|
|
|
3
3
|
declare const _default: <PO extends Record<string, any>, SO extends Record<string, any>, SQ extends Record<string, any>>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
4
|
props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{
|
|
5
|
-
readonly onHeightChange?: ((height: number) => any) | undefined;
|
|
6
5
|
readonly onSearch?: ((data: import('./types').ExcludeNeverProperties<import('./types').ExtractFormStringifyRawFromObject<PO, SO>> & SQ, type: FormSearchSearchType) => any) | undefined;
|
|
6
|
+
readonly onHeightChange?: ((height: number) => any) | undefined;
|
|
7
7
|
readonly onVisibleChange?: ((status: boolean) => any) | undefined;
|
|
8
8
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & FormSearchProps<PO, SO, SQ>, keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
|
|
9
9
|
expose(exposed: import('vue').ShallowUnwrapRef<FormSearchInstance>): void;
|
|
@@ -2,12 +2,14 @@ import { Plugin } from 'vue';
|
|
|
2
2
|
import { default as FormMain } from './FormMain.vue';
|
|
3
3
|
import { default as FormSelect } from './FormSelect.vue';
|
|
4
4
|
import { default as FormRadioGroup } from './FormRadioGroup.vue';
|
|
5
|
+
import { default as FormRadio } from './FormRadio.vue';
|
|
5
6
|
import { default as FormTree } from './FormTree.vue';
|
|
6
7
|
import { default as FormSearch } from './FormSearch.vue';
|
|
7
8
|
import { default as FormVerifyImage } from './FormVerifyImage.vue';
|
|
8
9
|
import { default as FormVerifyCode } from './FormVerifyCode.vue';
|
|
10
|
+
import { default as FormDateTimeRange } from './FormDateTimeRange.vue';
|
|
9
11
|
|
|
10
12
|
export * from './types';
|
|
11
13
|
export * from './utils';
|
|
12
|
-
export { FormMain, FormSelect, FormSearch, FormRadioGroup, FormTree, FormVerifyImage, FormVerifyCode, };
|
|
14
|
+
export { FormMain, FormSelect, FormSearch, FormRadioGroup, FormRadio, FormTree, FormVerifyImage, FormVerifyCode, FormDateTimeRange, };
|
|
13
15
|
export declare const formInstall: Plugin;
|
|
@@ -149,6 +149,7 @@ export interface FormMainProps<PO extends Record<string, any>, SO extends Record
|
|
|
149
149
|
list: FormItemConfigList<PO, SO>;
|
|
150
150
|
data: PO;
|
|
151
151
|
layout?: Partial<ColProps>;
|
|
152
|
+
rowGutter?: number;
|
|
152
153
|
}
|
|
153
154
|
/** FormSearch props */
|
|
154
155
|
export interface FormSearchProps<PO extends Record<string, any>, SO extends Record<string, any>, SQ extends Record<string, any>> extends FormMainProps<PO, SO> {
|
|
@@ -168,6 +169,13 @@ export type FormItemLoadingChangeFunc = (data: {
|
|
|
168
169
|
key: string;
|
|
169
170
|
message?: string;
|
|
170
171
|
}) => void;
|
|
172
|
+
/** 选项类型 */
|
|
173
|
+
export interface OptionItem extends Record<string, any> {
|
|
174
|
+
label: string | number;
|
|
175
|
+
value: string | number;
|
|
176
|
+
disabled?: boolean;
|
|
177
|
+
[key: string]: any;
|
|
178
|
+
}
|
|
171
179
|
/** form tree 单项类型 */
|
|
172
180
|
export interface FormTreeItem {
|
|
173
181
|
id: string | number;
|
|
@@ -180,6 +188,11 @@ export interface FormTreeItem {
|
|
|
180
188
|
export type FormItemSubmitType = "blur" | "change" | "enter";
|
|
181
189
|
/** 表单搜索搜索类型 */
|
|
182
190
|
export type FormSearchSearchType = "search" | "reset" | FormItemSubmitType;
|
|
191
|
+
/** 日期时间范围选择器快捷选项 */
|
|
192
|
+
export interface DateTimeRangeSwiftOption {
|
|
193
|
+
key: string;
|
|
194
|
+
set: () => [Date, Date];
|
|
195
|
+
}
|
|
183
196
|
export type FormItemConfigSwiftOptionsCommon<PO extends Record<string, any>,
|
|
184
197
|
/** 需要格式化的模型 */
|
|
185
198
|
SO extends Record<string, any>> = Omit<FormItemConfig<PO, SO>, "rules"> & {
|
|
@@ -3,7 +3,14 @@ import { TableMainInstance } from '../table';
|
|
|
3
3
|
import { ListPageInnerInjectInfo, ListPageInstance } from './types';
|
|
4
4
|
|
|
5
5
|
declare const _default: <T extends Record<string, any>, PO extends Record<string, any>, SO extends Record<string, any>, SQ extends Record<string, any>, F extends Record<string, any>>(__VLS_props: Awaited<typeof __VLS_setup>["props"], __VLS_ctx?: __VLS_Prettify<Pick<Awaited<typeof __VLS_setup>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
|
-
props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{
|
|
6
|
+
props: __VLS_Prettify<__VLS_OmitKeepDiscriminatedUnion<(Partial<{}> & Omit<{
|
|
7
|
+
readonly onDataChange?: ((data: T[]) => any) | undefined;
|
|
8
|
+
readonly onPageInfoChange?: ((info: {
|
|
9
|
+
pageSize: number;
|
|
10
|
+
currentPage: number;
|
|
11
|
+
total: number;
|
|
12
|
+
}) => any) | undefined;
|
|
13
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (Partial<Pick<import('../form').FormSearchProps<PO, SO, {}>, "staticQuery">> & {
|
|
7
14
|
formSearchProps?: Partial<Omit<import('../form').FormSearchProps<PO, SO, {}>, "list" | "staticQuery">> | undefined;
|
|
8
15
|
} & Pick<import('../table').TableMainProps<T, import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>> & SQ, ListPageInnerInjectInfo<PO, F>>, import('./types').TableMainRequiredKey> & Partial<Pick<import('../table').TableMainProps<T, import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>> & SQ, ListPageInnerInjectInfo<PO, F>>, import('./types').TableMainOptionsKey>> & {
|
|
9
16
|
tableMainProps?: Partial<Omit<import('../table').TableMainProps<T, import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>> & SQ, ListPageInnerInjectInfo<PO, F>>, import('./types').TableMainOptionsKey | import('./types').TableMainRewriteKey>> | undefined;
|
|
@@ -15,6 +22,8 @@ declare const _default: <T extends Record<string, any>, PO extends Record<string
|
|
|
15
22
|
injectInfo?: F | undefined;
|
|
16
23
|
beforeSearch?: ((data: import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>>, type: FormSearchSearchType) => import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>>) | undefined;
|
|
17
24
|
clearTableFilterOnReset?: boolean;
|
|
25
|
+
} & {
|
|
26
|
+
isAutoRefresh?: boolean;
|
|
18
27
|
}), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
|
|
19
28
|
expose(exposed: import('vue').ShallowUnwrapRef<ListPageInstance<PO>>): void;
|
|
20
29
|
attrs: any;
|
|
@@ -34,7 +43,14 @@ declare const _default: <T extends Record<string, any>, PO extends Record<string
|
|
|
34
43
|
}) => any>> & {
|
|
35
44
|
operation?(_: {}): any;
|
|
36
45
|
}>;
|
|
37
|
-
emit:
|
|
46
|
+
emit: {
|
|
47
|
+
(e: "dataChange", data: T[]): void;
|
|
48
|
+
(e: "pageInfoChange", info: {
|
|
49
|
+
pageSize: number;
|
|
50
|
+
currentPage: number;
|
|
51
|
+
total: number;
|
|
52
|
+
}): void;
|
|
53
|
+
};
|
|
38
54
|
}>) => import('vue').VNode & {
|
|
39
55
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
40
56
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
2
|
+
modelValue: import('vue').PropType<boolean>;
|
|
3
|
+
interval: import('vue').PropType<number>;
|
|
4
|
+
}>, {
|
|
5
|
+
trigger: () => void;
|
|
6
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
refresh: () => void;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
9
|
+
modelValue: import('vue').PropType<boolean>;
|
|
10
|
+
interval: import('vue').PropType<number>;
|
|
11
|
+
}>> & Readonly<{
|
|
12
|
+
onRefresh?: (() => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Plugin } from 'vue';
|
|
2
2
|
import { default as TriggerAutoImport } from './TriggerAutoImport.vue';
|
|
3
|
+
import { default as AutoRefresh } from './AutoRefresh.vue';
|
|
3
4
|
|
|
4
|
-
export { TriggerAutoImport };
|
|
5
|
+
export { TriggerAutoImport, AutoRefresh };
|
|
5
6
|
export declare const miscInstall: Plugin;
|
|
@@ -72,8 +72,8 @@ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractP
|
|
|
72
72
|
}>>> & Readonly<{
|
|
73
73
|
"onUpdate:show"?: ((value: boolean) => any) | undefined;
|
|
74
74
|
}>, {
|
|
75
|
-
width: number | string;
|
|
76
75
|
reverse: boolean;
|
|
76
|
+
width: number | string;
|
|
77
77
|
showClose: boolean;
|
|
78
78
|
cancelText: string | (() => VNode);
|
|
79
79
|
confirmText: string | (() => VNode);
|
|
@@ -6,7 +6,14 @@ declare const _default: <T extends Record<string, any>, SQ extends Record<string
|
|
|
6
6
|
readonly onPageChange?: ((value: number) => any) | undefined;
|
|
7
7
|
readonly onPageSizeChange?: ((value: number) => any) | undefined;
|
|
8
8
|
readonly onDataChange?: ((data: T[]) => any) | undefined;
|
|
9
|
-
|
|
9
|
+
readonly onPageInfoChange?: ((info: {
|
|
10
|
+
pageSize: number;
|
|
11
|
+
currentPage: number;
|
|
12
|
+
total: number;
|
|
13
|
+
}) => any) | undefined;
|
|
14
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & (TableMainProps<T, SQ, F> & {
|
|
15
|
+
isAutoRefresh?: boolean;
|
|
16
|
+
}), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
|
|
10
17
|
expose(exposed: import('vue').ShallowUnwrapRef<TableMainInstance>): void;
|
|
11
18
|
attrs: any;
|
|
12
19
|
slots: ReturnType<() => Partial<Record<NonNullable<Uppercase<string> | Extract<keyof T, string> | undefined>, (_: {
|
|
@@ -25,6 +32,11 @@ declare const _default: <T extends Record<string, any>, SQ extends Record<string
|
|
|
25
32
|
(e: "pageChange" | "pageSizeChange", value: number): void;
|
|
26
33
|
(e: "dataChange", data: T[]): void;
|
|
27
34
|
(e: "loadingChange", value: boolean): void;
|
|
35
|
+
(e: "pageInfoChange", info: {
|
|
36
|
+
pageSize: number;
|
|
37
|
+
currentPage: number;
|
|
38
|
+
total: number;
|
|
39
|
+
}): void;
|
|
28
40
|
};
|
|
29
41
|
}>) => import('vue').VNode & {
|
|
30
42
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { TableMainInstance } from './types';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
|
|
4
|
+
isAutoRefresh: import('vue').PropType<boolean>;
|
|
5
|
+
loading: {
|
|
6
|
+
type: globalThis.PropType<boolean>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
features: {
|
|
10
|
+
type: globalThis.PropType<import('./types').TableToolbarFeature[]>;
|
|
11
|
+
default: () => string[];
|
|
12
|
+
};
|
|
13
|
+
refreshInterval: {
|
|
14
|
+
type: globalThis.PropType<number>;
|
|
15
|
+
default: number;
|
|
16
|
+
};
|
|
17
|
+
tableExpose: {
|
|
18
|
+
type: globalThis.PropType<TableMainInstance>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
22
|
+
isAutoRefresh: import('vue').PropType<boolean>;
|
|
23
|
+
loading: {
|
|
24
|
+
type: globalThis.PropType<boolean>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
features: {
|
|
28
|
+
type: globalThis.PropType<import('./types').TableToolbarFeature[]>;
|
|
29
|
+
default: () => string[];
|
|
30
|
+
};
|
|
31
|
+
refreshInterval: {
|
|
32
|
+
type: globalThis.PropType<number>;
|
|
33
|
+
default: number;
|
|
34
|
+
};
|
|
35
|
+
tableExpose: {
|
|
36
|
+
type: globalThis.PropType<TableMainInstance>;
|
|
37
|
+
required: true;
|
|
38
|
+
};
|
|
39
|
+
}>> & Readonly<{}>, {
|
|
40
|
+
features: import('./types').TableToolbarFeature[];
|
|
41
|
+
refreshInterval: number;
|
|
42
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
43
|
+
export default _default;
|
|
@@ -18,10 +18,26 @@ SQ extends Record<string, any> = Record<string, any>> = BuildListParams<typeof A
|
|
|
18
18
|
*/
|
|
19
19
|
export type TableApiResult<T extends Record<string, any> = Record<string, any>> = UnionToIntersection<DotToObject<typeof APP_API_LIST_MODEL_KEY_CONFIG.LIST_KEY, T[]> | DotToObject<typeof APP_API_LIST_MODEL_KEY_CONFIG.TOTAL_KEY, number>>;
|
|
20
20
|
export interface TableMainInstance {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
/** 如果关心是否结束(无论成功还是失败 甚至都未发起请求(比如某些状态机未满足)),那么可以await, 等待刷新调用给个结束 */
|
|
22
|
+
refresh: (silent?: boolean) => Promise<unknown>;
|
|
23
|
+
/** 如果关心是否结束(无论成功还是失败 甚至都未发起请求(比如某些状态机未满足)),那么可以await, 等待刷新调用给个结束 */
|
|
24
|
+
reload: (slice?: boolean) => Promise<unknown>;
|
|
23
25
|
getTableInstance: () => TableInstance | undefined;
|
|
24
26
|
}
|
|
27
|
+
/** toolbar 可配置功能列表 */
|
|
28
|
+
export type TableToolbarFeature = "refresh" | "autoRefresh";
|
|
29
|
+
/** toolbar 可配置项(通过 TableMain 的 toolbar prop 传入) */
|
|
30
|
+
export interface TableToolbarConfig {
|
|
31
|
+
/**
|
|
32
|
+
* 功能列表。
|
|
33
|
+
* - undefined(默认):显示所有功能
|
|
34
|
+
* - [](空数组):不渲染 toolbar
|
|
35
|
+
* - 枚举子集:仅显示指定功能
|
|
36
|
+
*/
|
|
37
|
+
features?: TableToolbarFeature[];
|
|
38
|
+
/** 自动刷新默认间隔(秒),默认 30 */
|
|
39
|
+
refreshInterval?: number;
|
|
40
|
+
}
|
|
25
41
|
/** 表格列默认作用域 */
|
|
26
42
|
export interface TableColumnDefaultScope<T extends Record<string, any>, F extends Record<string, any>> {
|
|
27
43
|
row: T;
|
|
@@ -66,6 +82,10 @@ SQ extends Record<string, any>,
|
|
|
66
82
|
F extends Record<string, any>> {
|
|
67
83
|
/** 展示分页器 */
|
|
68
84
|
showPager?: boolean;
|
|
85
|
+
/** 是否显示 toolbar(顶层开关,默认 true,优先级高于 toolbar.features) */
|
|
86
|
+
showToolbar?: boolean;
|
|
87
|
+
/** toolbar 配置 */
|
|
88
|
+
toolbar?: TableToolbarConfig;
|
|
69
89
|
/** 参数 */
|
|
70
90
|
query?: SQ;
|
|
71
91
|
/** 每页条数 */
|
package/types/config/route.d.ts
CHANGED