@done-coding/admin-core 0.0.1-alpha.1 → 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.
Files changed (44) hide show
  1. package/es/components/display/TabsMain.vue.mjs +61 -0
  2. package/es/components/display/TabsMain.vue2.mjs +4 -0
  3. package/es/components/display/index.mjs +9 -7
  4. package/es/components/form/FormDateTimeRange.vue.mjs +46 -0
  5. package/es/components/form/FormDateTimeRange.vue2.mjs +4 -0
  6. package/es/components/form/FormRadio.vue.mjs +69 -0
  7. package/es/components/form/FormRadio.vue2.mjs +4 -0
  8. package/es/components/form/index.mjs +29 -23
  9. package/es/components/list-page/ListPage.vue.mjs +2 -2
  10. package/es/components/list-page/ListPage.vue2.mjs +102 -97
  11. package/es/components/misc/AutoRefresh.vue.mjs +7 -0
  12. package/es/components/misc/AutoRefresh.vue2.mjs +57 -0
  13. package/es/components/misc/index.mjs +7 -5
  14. package/es/components/table/TableMain.vue.mjs +3 -3
  15. package/es/components/table/TableMain.vue2.mjs +158 -121
  16. package/es/components/table/TableToolbar.vue.mjs +7 -0
  17. package/es/components/table/TableToolbar.vue2.mjs +75 -0
  18. package/es/config/route.mjs +3 -2
  19. package/es/helpers/list-helper.mjs +66 -0
  20. package/es/hooks/timeout.mjs +21 -0
  21. package/es/index.mjs +88 -73
  22. package/es/style.css +1 -1
  23. package/package.json +2 -2
  24. package/types/components/display/TabsMain.vue.d.ts +52 -0
  25. package/types/components/display/index.d.ts +2 -1
  26. package/types/components/form/FormDateTimeRange.vue.d.ts +18 -0
  27. package/types/components/form/FormRadio.vue.d.ts +35 -0
  28. package/types/components/form/FormSearch.vue.d.ts +1 -1
  29. package/types/components/form/FormSelect.vue.d.ts +2 -6
  30. package/types/components/form/index.d.ts +3 -1
  31. package/types/components/form/types.d.ts +12 -0
  32. package/types/components/list-page/ListPage.vue.d.ts +2 -0
  33. package/types/components/misc/AutoRefresh.vue.d.ts +14 -0
  34. package/types/components/misc/index.d.ts +2 -1
  35. package/types/components/modal/ConfirmModal.vue.d.ts +1 -1
  36. package/types/components/table/TableMain.vue.d.ts +3 -1
  37. package/types/components/table/TableToolbar.vue.d.ts +43 -0
  38. package/types/components/table/types.d.ts +22 -2
  39. package/types/config/route.d.ts +2 -0
  40. package/types/helpers/index.d.ts +2 -0
  41. package/types/helpers/list-helper.d.ts +36 -0
  42. package/types/helpers/types.d.ts +15 -0
  43. package/types/hooks/index.d.ts +1 -0
  44. 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 c } from "./components/form/FormMain.vue.mjs";
10
- import { default as M } from "./components/form/FormRadioGroup.vue.mjs";
11
- import { default as T } from "./components/form/FormSelect.vue.mjs";
12
- import { default as D } from "./components/form/FormTree.vue.mjs";
13
- import { default as O } from "./components/form/FormVerifyCode.vue.mjs";
14
- import { default as P } from "./components/menu/MenuItemSub.vue.mjs";
15
- import { default as N } from "./components/menu/MenuTree.vue.mjs";
16
- import { default as h } from "./components/misc/TriggerAutoImport.vue.mjs";
17
- import { default as y } from "./components/display/WatchSize.vue.mjs";
18
- import { APP_API_LIST_MODEL_KEY_CONFIG as v } from "./config/list-model.mjs";
19
- import { BODY_CONTENT_VIEWPORT_HEIGHT as H } from "./inject/key.mjs";
20
- import { default as z } from "./components/modal/ConfirmModal.vue.mjs";
21
- import { FORM_CONFIG_SELECT_ALL_VALUE as K, getConfirmPasswordRule as Y, passwordRule as j, setFormComponentType as k } from "./helpers/form.mjs";
22
- import { FORM_ITEM_CHANGE_LOADING as J, generateFormData as Q, getBlurSubmit as X, getChangeSubmit as Z, getEnterSubmit as $, getPlaceholder as ee, getVModelSugar as te, parseFormData as oe, setInputComponent as re, setSelectComponent as ae, stringifyFormData as me, swiftFormItemConfig as fe } from "./components/form/utils.mjs";
23
- import { default as le } from "./components/form/FormSearch.vue.mjs";
24
- import { default as ie } from "./components/form/FormVerifyImage.vue.mjs";
25
- import { default as ne } from "./components/list-page/ListPage.vue.mjs";
26
- import { ROUTE_MODULE_LEVEL as de } from "./config/route.mjs";
27
- import { default as ge } from "./components/table/TableMain.vue.mjs";
28
- import { createGenerateRouteMetaRawTree as Fe } from "./helpers/route.mjs";
29
- import { createStorageWithNamespace as ce } from "./helpers/storage.mjs";
30
- import { createUseState as Me } from "./helpers/state.mjs";
31
- import { flatRouteMetaResolveRaw as Te, getRoutePermissionKey as Re } from "./utils/router.mjs";
32
- import { getId as Le } from "./utils/id.mjs";
33
- import { timeCountDown as Ae } from "./utils/time.mjs";
34
- import { useActivated as Ge, useActivatedEvent as Ne, useActivatedExec as be } from "./hooks/activated.mjs";
35
- import { useFeelSize as we } from "./hooks/feel-size.mjs";
36
- import { useMenusDataDispatch as Ve } from "./hooks/menus-dispatch.mjs";
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
- v as APP_API_LIST_MODEL_KEY_CONFIG,
44
- H as BODY_CONTENT_VIEWPORT_HEIGHT,
45
- z as ConfirmModal,
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
- K as FORM_CONFIG_SELECT_ALL_VALUE,
48
- J as FORM_ITEM_CHANGE_LOADING,
49
- c as FormMain,
50
- M as FormRadioGroup,
51
- le as FormSearch,
52
- T as FormSelect,
53
- D as FormTree,
54
- O as FormVerifyCode,
55
- ie as FormVerifyImage,
56
- ne as ListPage,
57
- P as MenuItemSub,
58
- N as MenuTree,
59
- de as ROUTE_MODULE_LEVEL,
60
- ge as TableMain,
61
- h as TriggerAutoImport,
62
- y as WatchSize,
63
- Fe as createGenerateRouteMetaRawTree,
64
- ce as createStorageWithNamespace,
65
- Me as createUseState,
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
- Te as flatRouteMetaResolveRaw,
80
+ Oe as fetchListAll,
81
+ Ve as flatRouteMetaResolveRaw,
68
82
  t as formInstall,
69
- Q as generateFormData,
70
- X as getBlurSubmit,
71
- Z as getChangeSubmit,
72
- Y as getConfirmPasswordRule,
73
- $ as getEnterSubmit,
74
- Le as getId,
75
- ee as getPlaceholder,
76
- Re as getRoutePermissionKey,
77
- te as getVModelSugar,
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
- oe as parseFormData,
84
- j as passwordRule,
85
- k as setFormComponentType,
86
- re as setInputComponent,
87
- ae as setSelectComponent,
88
- me as stringifyFormData,
89
- fe as swiftFormItemConfig,
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
- Ae as timeCountDown,
92
- Ge as useActivated,
93
- Ne as useActivatedEvent,
94
- be as useActivatedExec,
95
- we as useFeelSize,
96
- Ve as useMenusDataDispatch
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-c7f10ff2]{--el-table-header-bg-color: var(--d46c1602)}.table-main-pagination[data-v-c7f10ff2]{margin-top:10px;display:flex;justify-content:flex-end}.list-page[data-v-c9564dc7]{min-height:var(--f49642f0)}.list-page-operation[data-v-c9564dc7]{margin-bottom:10px}.list-page[data-v-c9564dc7] .el-loading-mask{left:-10px;top:-10px;right:-10px;bottom:-10px}
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.1",
3
+ "version": "0.0.1-alpha.2",
4
4
  "description": "后台管理核心",
5
5
  "private": false,
6
6
  "main": "lib/index.cjs",
@@ -77,5 +77,5 @@
77
77
  "node": ">=18.0.0",
78
78
  "pnpm": ">=9.0.0"
79
79
  },
80
- "gitHead": "66c74dcd8e8bb283b06a1a2515f98406fe9b0f13"
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
+ };
@@ -1,5 +1,6 @@
1
1
  import { Plugin } from 'vue';
2
2
  import { default as WatchSize } from './WatchSize.vue';
3
+ import { default as TabsMain } from './TabsMain.vue';
3
4
 
4
- export { WatchSize };
5
+ export { WatchSize, TabsMain };
5
6
  export declare const displayInstall: Plugin;
@@ -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;
@@ -1,9 +1,5 @@
1
- interface OptionItem extends Record<string, any> {
2
- label: string;
3
- value: string | number;
4
- disabled?: boolean;
5
- [key: string]: any;
6
- }
1
+ import { OptionItem } from './types';
2
+
7
3
  declare function __VLS_template(): {
8
4
  option?(_: {
9
5
  data: OptionItem;
@@ -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;
@@ -169,6 +169,13 @@ export type FormItemLoadingChangeFunc = (data: {
169
169
  key: string;
170
170
  message?: string;
171
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
+ }
172
179
  /** form tree 单项类型 */
173
180
  export interface FormTreeItem {
174
181
  id: string | number;
@@ -181,6 +188,11 @@ export interface FormTreeItem {
181
188
  export type FormItemSubmitType = "blur" | "change" | "enter";
182
189
  /** 表单搜索搜索类型 */
183
190
  export type FormSearchSearchType = "search" | "reset" | FormItemSubmitType;
191
+ /** 日期时间范围选择器快捷选项 */
192
+ export interface DateTimeRangeSwiftOption {
193
+ key: string;
194
+ set: () => [Date, Date];
195
+ }
184
196
  export type FormItemConfigSwiftOptionsCommon<PO extends Record<string, any>,
185
197
  /** 需要格式化的模型 */
186
198
  SO extends Record<string, any>> = Omit<FormItemConfig<PO, SO>, "rules"> & {
@@ -22,6 +22,8 @@ declare const _default: <T extends Record<string, any>, PO extends Record<string
22
22
  injectInfo?: F | undefined;
23
23
  beforeSearch?: ((data: import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>>, type: FormSearchSearchType) => import('../form').ExcludeNeverProperties<import('../form').ExtractFormStringifyRawFromObject<PO, SO>>) | undefined;
24
24
  clearTableFilterOnReset?: boolean;
25
+ } & {
26
+ isAutoRefresh?: boolean;
25
27
  }), keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
26
28
  expose(exposed: import('vue').ShallowUnwrapRef<ListPageInstance<PO>>): void;
27
29
  attrs: any;
@@ -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);
@@ -11,7 +11,9 @@ declare const _default: <T extends Record<string, any>, SQ extends Record<string
11
11
  currentPage: number;
12
12
  total: number;
13
13
  }) => any) | undefined;
14
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>) & TableMainProps<T, SQ, F>, keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps>> & {} & (import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps);
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);
15
17
  expose(exposed: import('vue').ShallowUnwrapRef<TableMainInstance>): void;
16
18
  attrs: any;
17
19
  slots: ReturnType<() => Partial<Record<NonNullable<Uppercase<string> | Extract<keyof T, string> | undefined>, (_: {
@@ -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
- refresh: (silent?: boolean) => void;
22
- reload: (slice?: boolean) => void;
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
  /** 每页条数 */
@@ -1,2 +1,4 @@
1
1
  /** 模块级别的路由 */
2
2
  export declare const ROUTE_MODULE_LEVEL = 1;
3
+ /** TabsMain replaceQuery 同步到路由时的 query key */
4
+ export declare const TabsMainReplaceQueryKey = "_tab";
@@ -2,3 +2,5 @@ export * from './form';
2
2
  export * from './storage';
3
3
  export * from './state';
4
4
  export * from './route';
5
+ export * from './types';
6
+ export * from './list-helper';
@@ -0,0 +1,36 @@
1
+ import { TableApiParams, TableApiResult } from '../components/table/types';
2
+
3
+ export interface FetchListAllOptions {
4
+ /** 单页大小,默认 200,范围 [1, 1000] */
5
+ pageSize?: number;
6
+ /** 累计抓取上限,默认 10000;totalRecord > limit 则 throw */
7
+ limit?: number;
8
+ }
9
+ /**
10
+ * 全量翻页拉取(串行,提前终止)
11
+ * ---
12
+ * @param api 原始分页 api 函数(签名同 TableMain :api prop)
13
+ * @param baseParams 业务侧固定参数,会透传到每页 api 调用(不被改写)
14
+ * @param opts pageSize / limit 覆盖
15
+ * @returns 全量 items 数组
16
+ *
17
+ * 行为:
18
+ * - totalRecord = 0 → 直接 [] 返回(仅调 1 次)
19
+ * - 单页 items.length < pageSize → 视为末页提前终止
20
+ * - 任一页 reject → 整体 reject 透传原错误
21
+ * - totalRecord > limit → throw 兜底
22
+ */
23
+ export declare function fetchListAll<T extends Record<string, any>, P extends Record<string, any> = {}>(api: (params: TableApiParams<P>) => Promise<TableApiResult<T>>, baseParams?: P, opts?: FetchListAllOptions): Promise<T[]>;
24
+ export type ListApiSource<T> = T[] | (() => T[]) | (() => Promise<T[]>);
25
+ /**
26
+ * 用本地数组 / 同步函数 / 异步函数生成符合 TableMain :api prop 签名的 api
27
+ * ---
28
+ * 内部识别 source 类型 + 分页切片;无缓存,每次调用 source 重新求值
29
+ */
30
+ export declare function createListApi<T extends Record<string, any>>(source: ListApiSource<T>): (params: TableApiParams<{}>) => Promise<TableApiResult<T>>;
31
+ /**
32
+ * countAll: 仅探测列表总记录数,不拉数据。
33
+ * 1 次 api 调用 page=1/pageSize=1,返回 totalRecord。
34
+ * 用于"探测是否有数据 / 数据计数 / 存在性判断"等场景,替代手工 pageSize: 9999 hack。
35
+ */
36
+ export declare function countAll<P extends Record<string, any> = {}>(api: (params: TableApiParams<P>) => Promise<TableApiResult<any>>, baseParams?: P): Promise<number>;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * 深度递归 Partial(函数类型保持不变,object 类型字段递归可选)
3
+ * ---
4
+ * 应用场景:SDK 请求参数嵌套结构的可选化(如 PagingInput)
5
+ */
6
+ export type DeepPartial<T> = T extends (...args: any[]) => any ? T : T extends object ? {
7
+ [K in keyof T]?: DeepPartial<T[K]>;
8
+ } : T;
9
+ /**
10
+ * 分页请求参数的可选包装
11
+ * ---
12
+ * 与 SDK 1.1.40 嵌套契约耦合:业务侧手包 list api wrapper 时
13
+ * 常以 PagingInput<RawApiParams> 作为入参类型,兜底字段缺失
14
+ */
15
+ export type PagingInput<T> = DeepPartial<T>;
@@ -1,3 +1,4 @@
1
1
  export * from './activated';
2
2
  export * from './feel-size';
3
3
  export * from './menus-dispatch';
4
+ export * from './timeout';
@@ -0,0 +1,7 @@
1
+ export type ClearTimer = () => void;
2
+ export type SetTimer = (handler: () => void, timeout: number) => void;
3
+ /**
4
+ * 使用定时器
5
+ * @param autoClear 是否在生命周期结束前自动清除定时器
6
+ */
7
+ export declare const useTimeout: (autoClear?: boolean) => [SetTimer, ClearTimer];