@oiij/naive-ui 0.0.76 → 0.0.78
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/dist/components/config-providers/ConfigProviders.vue.d.ts +2 -2
- package/dist/components/config-providers/index.d.ts +16 -7
- package/dist/components/copy-button/CopyButton.js +2 -2
- package/dist/components/copy-button/CopyButton.vue.d.ts +4 -4
- package/dist/components/copy-button/index.d.ts +6 -3
- package/dist/components/data-table-plus/DataTablePlus.js +74 -125
- package/dist/components/data-table-plus/DataTablePlus.vue.d.ts +46 -111
- package/dist/components/data-table-plus/index.d.ts +52 -32
- package/dist/components/index.d.ts +2 -4
- package/dist/components/loading-provider/LoadingProvider.js +2 -2
- package/dist/components/loading-provider/LoadingProvider.vue.d.ts +2 -2
- package/dist/components/loading-provider/index.d.ts +19 -10
- package/dist/components/loading-provider/index.js +5 -2
- package/dist/components/preset-form/PresetForm.js +42 -21
- package/dist/components/preset-form/PresetForm.vue.d.ts +21 -21
- package/dist/components/preset-form/_utils.js +23 -8
- package/dist/components/preset-form/index.d.ts +32 -13
- package/dist/components/preset-input/PresetInput.vue.d.ts +3 -3
- package/dist/components/preset-input/index.d.ts +30 -20
- package/dist/components/preset-picker/PresetPicker.js +31 -34
- package/dist/components/preset-picker/PresetPicker.vue.d.ts +5 -10
- package/dist/components/preset-picker/index.d.ts +45 -31
- package/dist/components/preset-select/PresetSelect.js +23 -59
- package/dist/components/preset-select/PresetSelect.vue.d.ts +35 -39
- package/dist/components/preset-select/index.d.ts +56 -22
- package/dist/components/remote-request/RemoteRequest.js +7 -7
- package/dist/components/remote-request/RemoteRequest.vue.d.ts +13 -13
- package/dist/components/remote-request/index.d.ts +30 -8
- package/dist/components/search-input/SearchInput.vue.d.ts +4 -4
- package/dist/components/search-input/index.d.ts +10 -7
- package/dist/components/toggle-input/ToggleInput.vue.d.ts +4 -4
- package/dist/components/tooltip-button/TooltipButton.vue.d.ts +4 -4
- package/dist/components/tooltip-button/index.d.ts +5 -2
- package/dist/components/transition/BaseTransition.vue.d.ts +2 -2
- package/dist/components/transition/index.d.ts +4 -1
- package/dist/components.d.ts +2 -4
- package/dist/components.js +2 -3
- package/dist/composables/_helper.d.ts +7 -4
- package/dist/composables/_helper.js +47 -0
- package/dist/composables/index.d.ts +1 -1
- package/dist/composables/use-data-request.d.ts +25 -18
- package/dist/composables/use-data-request.js +22 -3
- package/dist/composables/use-loading.d.ts +6 -0
- package/dist/composables/use-loading.js +8 -2
- package/dist/composables/use-naive-form.d.ts +21 -13
- package/dist/composables/use-naive-form.js +48 -39
- package/dist/composables/use-naive-menu.d.ts +20 -5
- package/dist/composables/use-naive-menu.js +19 -61
- package/dist/composables/use-naive-theme.d.ts +27 -14
- package/dist/composables/use-naive-theme.js +22 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +5 -7
- package/dist/components/_utils/prismjs.js +0 -16
- package/dist/components/icons/MageArrowUp.js +0 -29
- package/dist/components/type-writer/TypeWriter.js +0 -75
- package/dist/components/type-writer/TypeWriter.vue.d.ts +0 -22
- package/dist/components/type-writer/index.d.ts +0 -13
- package/dist/components/type-writer/type-writer.cssr.js +0 -27
|
@@ -1,35 +1,33 @@
|
|
|
1
|
-
import { DataObject
|
|
1
|
+
import { DataObject } from "../../composables/use-data-request.js";
|
|
2
2
|
import { DataTablePlusEmits, DataTablePlusExpose, DataTablePlusProps } from "./index.js";
|
|
3
3
|
import "../../composables/index.js";
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
4
|
+
import * as _vueuse_core24 from "@vueuse/core";
|
|
5
|
+
import * as vue33 from "vue";
|
|
6
6
|
import { DataTableBaseColumn, DataTableFilterState, DataTableInst, DataTableSortState } from "naive-ui";
|
|
7
|
+
import { RowKey } from "naive-ui/es/data-table/src/interface";
|
|
7
8
|
|
|
8
9
|
//#region src/components/data-table-plus/DataTablePlus.vue.d.ts
|
|
9
10
|
declare const __VLS_export: <P extends DataObject, D extends DataObject, R extends DataObject>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
10
|
-
props:
|
|
11
|
-
onError?: ((err: Error, params: P[]) => any) | undefined;
|
|
11
|
+
props: vue33.PublicProps & __VLS_PrettifyLocal<DataTablePlusProps<P, D, R> & {
|
|
12
12
|
onSuccess?: ((data: D, params: P[]) => any) | undefined;
|
|
13
|
-
|
|
14
|
-
onScroll?: ((ev: Event) => any) | undefined;
|
|
15
|
-
onFinally?: ((params: P[], data?: D | undefined, err?: Error | undefined) => any) | undefined;
|
|
13
|
+
onError?: ((err: Error, params: P[]) => any) | undefined;
|
|
16
14
|
onBefore?: ((params: P[]) => any) | undefined;
|
|
17
15
|
"onUpdate:page"?: ((page: number) => any) | undefined;
|
|
18
16
|
"onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
|
|
17
|
+
onFinally?: ((params: P[], data?: D | undefined, err?: Error | undefined) => any) | undefined;
|
|
19
18
|
onClickRow?: ((row: R, index: number, event: MouseEvent, currentData: R[]) => any) | undefined;
|
|
20
19
|
onContextMenuRow?: ((row: R, index: number, event: MouseEvent, currentData: R[]) => any) | undefined;
|
|
21
|
-
|
|
22
|
-
"onUpdate:checkedRowKeys"?: ((keys: (string | number)[], rows: (R | undefined)[], meta: {
|
|
20
|
+
"onUpdate:checkedRowKeys"?: ((keys: RowKey[], rows: R[], meta: {
|
|
23
21
|
row: R | undefined;
|
|
24
22
|
action: "check" | "uncheck" | "checkAll" | "uncheckAll";
|
|
25
23
|
}, currentData: R[]) => any) | undefined;
|
|
26
|
-
"onUpdate:expandedRowKeys"?: ((keys: (string | number)[], currentData: R[]) => any) | undefined;
|
|
27
24
|
"onUpdate:filters"?: ((filterState: DataTableFilterState, sourceColumn: DataTableBaseColumn) => any) | undefined;
|
|
28
25
|
"onUpdate:sorter"?: ((options: DataTableSortState | DataTableSortState[] | null) => any) | undefined;
|
|
26
|
+
onLoadedRows?: ((data: R[]) => any) | undefined;
|
|
29
27
|
}> & (typeof globalThis extends {
|
|
30
28
|
__VLS_PROPS_FALLBACK: infer P_1;
|
|
31
29
|
} ? P_1 : {});
|
|
32
|
-
expose: (exposed:
|
|
30
|
+
expose: (exposed: vue33.ShallowUnwrapRef<DataTablePlusExpose<P, D, R>>) => void;
|
|
33
31
|
attrs: any;
|
|
34
32
|
slots: {
|
|
35
33
|
header?: (props: {
|
|
@@ -38,7 +36,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
38
36
|
error: Error | undefined;
|
|
39
37
|
params: [] | P[];
|
|
40
38
|
list: R[];
|
|
41
|
-
|
|
39
|
+
pagination: {
|
|
42
40
|
page: number;
|
|
43
41
|
pageSize: number;
|
|
44
42
|
itemCount: number;
|
|
@@ -46,15 +44,6 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
46
44
|
filters: DataTableFilterState | undefined;
|
|
47
45
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
48
46
|
dataTableInst: DataTableInst | null;
|
|
49
|
-
pagination: vue70.Ref<{
|
|
50
|
-
page: number;
|
|
51
|
-
pageSize: number;
|
|
52
|
-
itemCount: number;
|
|
53
|
-
}, UseDataRequestPagination | {
|
|
54
|
-
page: number;
|
|
55
|
-
pageSize: number;
|
|
56
|
-
itemCount: number;
|
|
57
|
-
}>;
|
|
58
47
|
run: (...params: P[]) => void;
|
|
59
48
|
runAsync: (...params: P[]) => Promise<D>;
|
|
60
49
|
refresh: () => void;
|
|
@@ -64,10 +53,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
64
53
|
setParams: (_params: Partial<P>) => void;
|
|
65
54
|
runParams: (_params: Partial<P>) => void;
|
|
66
55
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
67
|
-
onBefore:
|
|
68
|
-
onSuccess:
|
|
69
|
-
onError:
|
|
70
|
-
onFinally:
|
|
56
|
+
onBefore: _vueuse_core24.EventHookOn<[P[]]>;
|
|
57
|
+
onSuccess: _vueuse_core24.EventHookOn<[D, P[]]>;
|
|
58
|
+
onError: _vueuse_core24.EventHookOn<[Error, P[]]>;
|
|
59
|
+
onFinally: _vueuse_core24.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
71
60
|
}) => any;
|
|
72
61
|
} & {
|
|
73
62
|
title?: (props: {}) => any;
|
|
@@ -78,7 +67,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
78
67
|
error: Error | undefined;
|
|
79
68
|
params: [] | P[];
|
|
80
69
|
list: R[];
|
|
81
|
-
|
|
70
|
+
pagination: {
|
|
82
71
|
page: number;
|
|
83
72
|
pageSize: number;
|
|
84
73
|
itemCount: number;
|
|
@@ -86,15 +75,6 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
86
75
|
filters: DataTableFilterState | undefined;
|
|
87
76
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
88
77
|
dataTableInst: DataTableInst | null;
|
|
89
|
-
pagination: vue70.Ref<{
|
|
90
|
-
page: number;
|
|
91
|
-
pageSize: number;
|
|
92
|
-
itemCount: number;
|
|
93
|
-
}, UseDataRequestPagination | {
|
|
94
|
-
page: number;
|
|
95
|
-
pageSize: number;
|
|
96
|
-
itemCount: number;
|
|
97
|
-
}>;
|
|
98
78
|
run: (...params: P[]) => void;
|
|
99
79
|
runAsync: (...params: P[]) => Promise<D>;
|
|
100
80
|
refresh: () => void;
|
|
@@ -104,10 +84,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
104
84
|
setParams: (_params: Partial<P>) => void;
|
|
105
85
|
runParams: (_params: Partial<P>) => void;
|
|
106
86
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
107
|
-
onBefore:
|
|
108
|
-
onSuccess:
|
|
109
|
-
onError:
|
|
110
|
-
onFinally:
|
|
87
|
+
onBefore: _vueuse_core24.EventHookOn<[P[]]>;
|
|
88
|
+
onSuccess: _vueuse_core24.EventHookOn<[D, P[]]>;
|
|
89
|
+
onError: _vueuse_core24.EventHookOn<[Error, P[]]>;
|
|
90
|
+
onFinally: _vueuse_core24.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
111
91
|
}) => any;
|
|
112
92
|
} & {
|
|
113
93
|
filter?: (props: {
|
|
@@ -116,7 +96,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
116
96
|
error: Error | undefined;
|
|
117
97
|
params: [] | P[];
|
|
118
98
|
list: R[];
|
|
119
|
-
|
|
99
|
+
pagination: {
|
|
120
100
|
page: number;
|
|
121
101
|
pageSize: number;
|
|
122
102
|
itemCount: number;
|
|
@@ -124,15 +104,6 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
124
104
|
filters: DataTableFilterState | undefined;
|
|
125
105
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
126
106
|
dataTableInst: DataTableInst | null;
|
|
127
|
-
pagination: vue70.Ref<{
|
|
128
|
-
page: number;
|
|
129
|
-
pageSize: number;
|
|
130
|
-
itemCount: number;
|
|
131
|
-
}, UseDataRequestPagination | {
|
|
132
|
-
page: number;
|
|
133
|
-
pageSize: number;
|
|
134
|
-
itemCount: number;
|
|
135
|
-
}>;
|
|
136
107
|
run: (...params: P[]) => void;
|
|
137
108
|
runAsync: (...params: P[]) => Promise<D>;
|
|
138
109
|
refresh: () => void;
|
|
@@ -142,10 +113,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
142
113
|
setParams: (_params: Partial<P>) => void;
|
|
143
114
|
runParams: (_params: Partial<P>) => void;
|
|
144
115
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
145
|
-
onBefore:
|
|
146
|
-
onSuccess:
|
|
147
|
-
onError:
|
|
148
|
-
onFinally:
|
|
116
|
+
onBefore: _vueuse_core24.EventHookOn<[P[]]>;
|
|
117
|
+
onSuccess: _vueuse_core24.EventHookOn<[D, P[]]>;
|
|
118
|
+
onError: _vueuse_core24.EventHookOn<[Error, P[]]>;
|
|
119
|
+
onFinally: _vueuse_core24.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
149
120
|
}) => any;
|
|
150
121
|
} & {
|
|
151
122
|
empty?: (props: {
|
|
@@ -154,7 +125,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
154
125
|
error: Error | undefined;
|
|
155
126
|
params: [] | P[];
|
|
156
127
|
list: R[];
|
|
157
|
-
|
|
128
|
+
pagination: {
|
|
158
129
|
page: number;
|
|
159
130
|
pageSize: number;
|
|
160
131
|
itemCount: number;
|
|
@@ -162,15 +133,6 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
162
133
|
filters: DataTableFilterState | undefined;
|
|
163
134
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
164
135
|
dataTableInst: DataTableInst | null;
|
|
165
|
-
pagination: vue70.Ref<{
|
|
166
|
-
page: number;
|
|
167
|
-
pageSize: number;
|
|
168
|
-
itemCount: number;
|
|
169
|
-
}, UseDataRequestPagination | {
|
|
170
|
-
page: number;
|
|
171
|
-
pageSize: number;
|
|
172
|
-
itemCount: number;
|
|
173
|
-
}>;
|
|
174
136
|
run: (...params: P[]) => void;
|
|
175
137
|
runAsync: (...params: P[]) => Promise<D>;
|
|
176
138
|
refresh: () => void;
|
|
@@ -180,10 +142,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
180
142
|
setParams: (_params: Partial<P>) => void;
|
|
181
143
|
runParams: (_params: Partial<P>) => void;
|
|
182
144
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
183
|
-
onBefore:
|
|
184
|
-
onSuccess:
|
|
185
|
-
onError:
|
|
186
|
-
onFinally:
|
|
145
|
+
onBefore: _vueuse_core24.EventHookOn<[P[]]>;
|
|
146
|
+
onSuccess: _vueuse_core24.EventHookOn<[D, P[]]>;
|
|
147
|
+
onError: _vueuse_core24.EventHookOn<[Error, P[]]>;
|
|
148
|
+
onFinally: _vueuse_core24.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
187
149
|
}) => any;
|
|
188
150
|
} & {
|
|
189
151
|
loading?: (props: {
|
|
@@ -192,7 +154,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
192
154
|
error: Error | undefined;
|
|
193
155
|
params: [] | P[];
|
|
194
156
|
list: R[];
|
|
195
|
-
|
|
157
|
+
pagination: {
|
|
196
158
|
page: number;
|
|
197
159
|
pageSize: number;
|
|
198
160
|
itemCount: number;
|
|
@@ -200,15 +162,6 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
200
162
|
filters: DataTableFilterState | undefined;
|
|
201
163
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
202
164
|
dataTableInst: DataTableInst | null;
|
|
203
|
-
pagination: vue70.Ref<{
|
|
204
|
-
page: number;
|
|
205
|
-
pageSize: number;
|
|
206
|
-
itemCount: number;
|
|
207
|
-
}, UseDataRequestPagination | {
|
|
208
|
-
page: number;
|
|
209
|
-
pageSize: number;
|
|
210
|
-
itemCount: number;
|
|
211
|
-
}>;
|
|
212
165
|
run: (...params: P[]) => void;
|
|
213
166
|
runAsync: (...params: P[]) => Promise<D>;
|
|
214
167
|
refresh: () => void;
|
|
@@ -218,10 +171,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
218
171
|
setParams: (_params: Partial<P>) => void;
|
|
219
172
|
runParams: (_params: Partial<P>) => void;
|
|
220
173
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
221
|
-
onBefore:
|
|
222
|
-
onSuccess:
|
|
223
|
-
onError:
|
|
224
|
-
onFinally:
|
|
174
|
+
onBefore: _vueuse_core24.EventHookOn<[P[]]>;
|
|
175
|
+
onSuccess: _vueuse_core24.EventHookOn<[D, P[]]>;
|
|
176
|
+
onError: _vueuse_core24.EventHookOn<[Error, P[]]>;
|
|
177
|
+
onFinally: _vueuse_core24.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
225
178
|
}) => any;
|
|
226
179
|
} & {
|
|
227
180
|
footer?: (props: {
|
|
@@ -230,7 +183,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
230
183
|
error: Error | undefined;
|
|
231
184
|
params: [] | P[];
|
|
232
185
|
list: R[];
|
|
233
|
-
|
|
186
|
+
pagination: {
|
|
234
187
|
page: number;
|
|
235
188
|
pageSize: number;
|
|
236
189
|
itemCount: number;
|
|
@@ -238,15 +191,6 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
238
191
|
filters: DataTableFilterState | undefined;
|
|
239
192
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
240
193
|
dataTableInst: DataTableInst | null;
|
|
241
|
-
pagination: vue70.Ref<{
|
|
242
|
-
page: number;
|
|
243
|
-
pageSize: number;
|
|
244
|
-
itemCount: number;
|
|
245
|
-
}, UseDataRequestPagination | {
|
|
246
|
-
page: number;
|
|
247
|
-
pageSize: number;
|
|
248
|
-
itemCount: number;
|
|
249
|
-
}>;
|
|
250
194
|
run: (...params: P[]) => void;
|
|
251
195
|
runAsync: (...params: P[]) => Promise<D>;
|
|
252
196
|
refresh: () => void;
|
|
@@ -256,10 +200,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
256
200
|
setParams: (_params: Partial<P>) => void;
|
|
257
201
|
runParams: (_params: Partial<P>) => void;
|
|
258
202
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
259
|
-
onBefore:
|
|
260
|
-
onSuccess:
|
|
261
|
-
onError:
|
|
262
|
-
onFinally:
|
|
203
|
+
onBefore: _vueuse_core24.EventHookOn<[P[]]>;
|
|
204
|
+
onSuccess: _vueuse_core24.EventHookOn<[D, P[]]>;
|
|
205
|
+
onError: _vueuse_core24.EventHookOn<[Error, P[]]>;
|
|
206
|
+
onFinally: _vueuse_core24.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
263
207
|
}) => any;
|
|
264
208
|
} & {
|
|
265
209
|
'footer-extra'?: (props: {
|
|
@@ -268,7 +212,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
268
212
|
error: Error | undefined;
|
|
269
213
|
params: [] | P[];
|
|
270
214
|
list: R[];
|
|
271
|
-
|
|
215
|
+
pagination: {
|
|
272
216
|
page: number;
|
|
273
217
|
pageSize: number;
|
|
274
218
|
itemCount: number;
|
|
@@ -276,15 +220,6 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
276
220
|
filters: DataTableFilterState | undefined;
|
|
277
221
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
278
222
|
dataTableInst: DataTableInst | null;
|
|
279
|
-
pagination: vue70.Ref<{
|
|
280
|
-
page: number;
|
|
281
|
-
pageSize: number;
|
|
282
|
-
itemCount: number;
|
|
283
|
-
}, UseDataRequestPagination | {
|
|
284
|
-
page: number;
|
|
285
|
-
pageSize: number;
|
|
286
|
-
itemCount: number;
|
|
287
|
-
}>;
|
|
288
223
|
run: (...params: P[]) => void;
|
|
289
224
|
runAsync: (...params: P[]) => Promise<D>;
|
|
290
225
|
refresh: () => void;
|
|
@@ -294,14 +229,14 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
294
229
|
setParams: (_params: Partial<P>) => void;
|
|
295
230
|
runParams: (_params: Partial<P>) => void;
|
|
296
231
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
297
|
-
onBefore:
|
|
298
|
-
onSuccess:
|
|
299
|
-
onError:
|
|
300
|
-
onFinally:
|
|
232
|
+
onBefore: _vueuse_core24.EventHookOn<[P[]]>;
|
|
233
|
+
onSuccess: _vueuse_core24.EventHookOn<[D, P[]]>;
|
|
234
|
+
onError: _vueuse_core24.EventHookOn<[Error, P[]]>;
|
|
235
|
+
onFinally: _vueuse_core24.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
301
236
|
}) => any;
|
|
302
237
|
};
|
|
303
238
|
emit: DataTablePlusEmits<P, D, R>;
|
|
304
|
-
}>) =>
|
|
239
|
+
}>) => vue33.VNode & {
|
|
305
240
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
306
241
|
};
|
|
307
242
|
declare const _default: typeof __VLS_export;
|
|
@@ -3,57 +3,77 @@ import { RemoteRequestEmits, RemoteRequestProps } from "../remote-request/index.
|
|
|
3
3
|
import { SearchInputProps } from "../search-input/index.js";
|
|
4
4
|
import { _default } from "./DataTablePlus.vue.js";
|
|
5
5
|
import { CSSProperties, Ref, ShallowRef } from "vue";
|
|
6
|
-
import {
|
|
6
|
+
import { DataTableColumns, DataTableFilterState, DataTableInst, DataTableProps, DataTableSortState, PaginationProps } from "naive-ui";
|
|
7
7
|
import { ComponentExposed } from "vue-component-type-helpers";
|
|
8
|
-
import { FilterState, TableBaseColumn } from "naive-ui/es/data-table/src/interface";
|
|
8
|
+
import { FilterState, RowKey, TableBaseColumn } from "naive-ui/es/data-table/src/interface";
|
|
9
9
|
|
|
10
10
|
//#region src/components/data-table-plus/index.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* 类样式类型
|
|
13
|
+
*/
|
|
11
14
|
type ClassStyle = {
|
|
12
|
-
class?: string;
|
|
15
|
+
/** CSS 类名 */class?: string; /** CSS 样式 */
|
|
13
16
|
style?: CSSProperties | string;
|
|
14
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* 数据表格增强组件暴露的方法
|
|
20
|
+
* @template P 请求参数类型
|
|
21
|
+
* @template D 响应数据类型
|
|
22
|
+
* @template R 列表项类型
|
|
23
|
+
*/
|
|
15
24
|
type DataTablePlusExpose<P extends DataObject = DataObject, D extends DataObject = DataObject, R extends DataObject = DataObject> = UseDataRequestReturns<P, D, R> & {
|
|
16
|
-
filters: Ref<DataTableFilterState | undefined>;
|
|
17
|
-
sorters: Ref<Record<string, DataTableSortState> | undefined>;
|
|
25
|
+
/** 筛选状态 */filters: Ref<DataTableFilterState | undefined>; /** 排序状态 */
|
|
26
|
+
sorters: Ref<Record<string, DataTableSortState> | undefined>; /** 数据表格实例 */
|
|
18
27
|
dataTableInst: Readonly<ShallowRef<DataTableInst | null>>;
|
|
19
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* 数据表格增强字段配置
|
|
31
|
+
*/
|
|
20
32
|
type DataTablePlusFields = DataRequestFields & {
|
|
21
|
-
filter?: string;
|
|
22
|
-
sorter?: string;
|
|
23
|
-
rowKey?: string;
|
|
24
|
-
search?: string;
|
|
33
|
+
/** 筛选字段名 */filter?: string; /** 排序字段名 */
|
|
34
|
+
sorter?: string; /** 行键字段名 */
|
|
35
|
+
rowKey?: string; /** 搜索字段名 */
|
|
36
|
+
search?: string; /** 子节点字段名 */
|
|
25
37
|
children?: string;
|
|
26
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* 数据表格增强组件属性
|
|
41
|
+
* @template P 请求参数类型
|
|
42
|
+
* @template D 响应数据类型
|
|
43
|
+
* @template R 列表项类型
|
|
44
|
+
*/
|
|
27
45
|
type DataTablePlusProps<P extends DataObject = DataObject, D extends DataObject = DataObject, R extends DataObject = DataObject> = RemoteRequestProps<P, D> & {
|
|
28
|
-
title?: string;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
search?: SearchInputProps & ClassStyle | boolean;
|
|
36
|
-
pagination?: Omit<PaginationProps, 'page' | 'pageSize' | 'itemCount'> & ClassStyle | boolean;
|
|
37
|
-
columnsFilterOptions?: (filters: DataTableFilterState) => Record<string, any>;
|
|
38
|
-
columnsSorterOptions?: (sorters: Record<string, DataTableSortState>) => Record<string, any>;
|
|
46
|
+
/** 标题 */title?: string; /** 表格列配置 */
|
|
47
|
+
columns?: DataTableColumns<R>; /** 字段配置 */
|
|
48
|
+
fields?: DataTablePlusFields; /** 搜索配置 */
|
|
49
|
+
search?: SearchInputProps & ClassStyle | boolean; /** 分页配置 */
|
|
50
|
+
pagination?: Omit<PaginationProps, 'page' | 'pageSize' | 'itemCount'> & ClassStyle | boolean; /** 列筛选选项 */
|
|
51
|
+
columnsFilterOptions?: (filters: DataTableFilterState) => Record<string, any>; /** 列排序选项 */
|
|
52
|
+
columnsSorterOptions?: (sorters: Record<string, DataTableSortState>) => Record<string, any>; /** 数据表格属性 */
|
|
39
53
|
dataTableProps?: DataTableProps & ClassStyle;
|
|
40
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* 数据表格增强组件事件
|
|
57
|
+
* @template P 请求参数类型
|
|
58
|
+
* @template D 响应数据类型
|
|
59
|
+
* @template R 列表项类型
|
|
60
|
+
*/
|
|
41
61
|
type DataTablePlusEmits<P extends DataObject = DataObject, D extends DataObject = DataObject, R extends DataObject = DataObject> = RemoteRequestEmits<P, D> & {
|
|
42
|
-
(e: 'clickRow', row: R, index: number, event: MouseEvent, currentData: R[]): void;
|
|
43
|
-
(e: 'contextMenuRow', row: R, index: number, event: MouseEvent, currentData: R[]): void;
|
|
44
|
-
(e: '
|
|
45
|
-
(e: 'scroll', ev: Event): void;
|
|
46
|
-
(e: 'scrollBottom', ev: Event): void;
|
|
47
|
-
(e: 'update:checkedRowKeys', keys: (string | number)[], rows: (R | undefined)[], meta: {
|
|
62
|
+
/** 点击行事件 */(e: 'clickRow', row: R, index: number, event: MouseEvent, currentData: R[]): void; /** 右键点击行事件 */
|
|
63
|
+
(e: 'contextMenuRow', row: R, index: number, event: MouseEvent, currentData: R[]): void; /** 更新选中行键事件 */
|
|
64
|
+
(e: 'update:checkedRowKeys', keys: RowKey[], rows: R[], meta: {
|
|
48
65
|
row: R | undefined;
|
|
49
66
|
action: 'check' | 'uncheck' | 'checkAll' | 'uncheckAll';
|
|
50
|
-
}, currentData: R[]): void;
|
|
51
|
-
(e: 'update:
|
|
52
|
-
(e: 'update:
|
|
53
|
-
(e: 'update:
|
|
54
|
-
(e: 'update:
|
|
55
|
-
(e: '
|
|
67
|
+
}, currentData: R[]): void; /** 更新筛选事件 */
|
|
68
|
+
(e: 'update:filters', filterState: FilterState, sourceColumn: TableBaseColumn): void; /** 更新排序事件 */
|
|
69
|
+
(e: 'update:sorter', options: DataTableSortState | DataTableSortState[] | null): void; /** 更新页码事件 */
|
|
70
|
+
(e: 'update:page', page: number): void; /** 更新每页大小事件 */
|
|
71
|
+
(e: 'update:pageSize', pageSize: number): void; /** 成功事件 */
|
|
72
|
+
(e: 'loadedRows', data: R[]): void;
|
|
56
73
|
};
|
|
74
|
+
/**
|
|
75
|
+
* 数据表格增强组件实例类型
|
|
76
|
+
*/
|
|
57
77
|
type DataTablePlusInst = ComponentExposed<typeof _default>;
|
|
58
78
|
//#endregion
|
|
59
79
|
export { ClassStyle, DataTablePlusEmits, DataTablePlusExpose, DataTablePlusFields, DataTablePlusInst, DataTablePlusProps };
|
|
@@ -5,7 +5,7 @@ import { SearchInputProps } from "./search-input/index.js";
|
|
|
5
5
|
import { _default as _default$2 } from "./data-table-plus/DataTablePlus.vue.js";
|
|
6
6
|
import { ClassStyle, DataTablePlusEmits, DataTablePlusExpose, DataTablePlusFields, DataTablePlusInst, DataTablePlusProps } from "./data-table-plus/index.js";
|
|
7
7
|
import { _default as _default$3 } from "./loading-provider/LoadingProvider.vue.js";
|
|
8
|
-
import { LoadingProviderInst, LoadingProviderProps
|
|
8
|
+
import { LOADING_PROVIDER_INJECTION_KEY, LoadingProviderInst, LoadingProviderProps } from "./loading-provider/index.js";
|
|
9
9
|
import { UseNaiveFormRules } from "../composables/use-naive-form.js";
|
|
10
10
|
import { _default as _default$4 } from "./config-providers/ConfigProviders.vue.js";
|
|
11
11
|
import { ConfigProvidersProps } from "./config-providers/index.js";
|
|
@@ -24,6 +24,4 @@ import "./toggle-input/index.js";
|
|
|
24
24
|
import { _default as _default$11 } from "./tooltip-button/TooltipButton.vue.js";
|
|
25
25
|
import { TooltipButtonProps } from "./tooltip-button/index.js";
|
|
26
26
|
import { _default as _default$12 } from "./transition/BaseTransition.vue.js";
|
|
27
|
-
import { TransitionProps } from "./transition/index.js";
|
|
28
|
-
import { _default as _default$13 } from "./type-writer/TypeWriter.vue.js";
|
|
29
|
-
import { TypeWriterProps } from "./type-writer/index.js";
|
|
27
|
+
import { TransitionProps } from "./transition/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import BaseTransition_default from "../transition/BaseTransition.js";
|
|
2
2
|
import { cName, loadingProviderCssr } from "./loading-provider.cssr.js";
|
|
3
|
-
import {
|
|
3
|
+
import { LOADING_PROVIDER_INJECTION_KEY } from "./index.js";
|
|
4
4
|
import { Fragment, Teleport, createBlock, createCommentVNode, createElementBlock, createSlots, createVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, provide, ref, renderSlot, unref, watchEffect, withCtx } from "vue";
|
|
5
5
|
import { useStyle } from "@oiij/css-render";
|
|
6
6
|
import { NEl, NSpin } from "naive-ui";
|
|
@@ -41,7 +41,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
41
|
}, _duration ?? __props.duration);
|
|
42
42
|
return { hide: hideLoading };
|
|
43
43
|
}
|
|
44
|
-
provide(
|
|
44
|
+
provide(LOADING_PROVIDER_INJECTION_KEY, {
|
|
45
45
|
show: showLoading,
|
|
46
46
|
hide: hideLoading
|
|
47
47
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LoadingProviderProps } from "./index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue58 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/loading-provider/LoadingProvider.vue.d.ts
|
|
5
5
|
declare var __VLS_26: {}, __VLS_29: {}, __VLS_31: {};
|
|
@@ -10,7 +10,7 @@ type __VLS_Slots = {} & {
|
|
|
10
10
|
} & {
|
|
11
11
|
default?: (props: typeof __VLS_31) => any;
|
|
12
12
|
};
|
|
13
|
-
declare const __VLS_base:
|
|
13
|
+
declare const __VLS_base: vue58.DefineComponent<LoadingProviderProps, {}, {}, {}, {}, vue58.ComponentOptionsMixin, vue58.ComponentOptionsMixin, {}, string, vue58.PublicProps, Readonly<LoadingProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, vue58.ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
15
|
declare const _default: typeof __VLS_export;
|
|
16
16
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -4,21 +4,30 @@ import { CSSProperties, InjectionKey, RendererElement } from "vue";
|
|
|
4
4
|
import { SpinProps } from "naive-ui";
|
|
5
5
|
|
|
6
6
|
//#region src/components/loading-provider/index.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* 加载提供者实例
|
|
9
|
+
*/
|
|
7
10
|
type LoadingProviderInst = {
|
|
8
|
-
show: (options?: {
|
|
9
|
-
text?: string;
|
|
11
|
+
/** 显示加载 */show: (options?: {
|
|
12
|
+
/** 加载文本 */text?: string; /** 持续时间 */
|
|
10
13
|
duration?: number;
|
|
11
|
-
}) => void;
|
|
14
|
+
}) => void; /** 隐藏加载 */
|
|
12
15
|
hide: () => void;
|
|
13
16
|
};
|
|
14
|
-
|
|
17
|
+
/**
|
|
18
|
+
* 加载提供者注入键
|
|
19
|
+
*/
|
|
20
|
+
declare const LOADING_PROVIDER_INJECTION_KEY: InjectionKey<LoadingProviderInst>;
|
|
21
|
+
/**
|
|
22
|
+
* 加载提供者属性
|
|
23
|
+
*/
|
|
15
24
|
type LoadingProviderProps = {
|
|
16
|
-
show?: boolean;
|
|
17
|
-
appendTo?: string | RendererElement;
|
|
18
|
-
mask?: boolean | CSSProperties;
|
|
19
|
-
blur?: boolean;
|
|
20
|
-
duration?: number;
|
|
25
|
+
/** 是否显示 */show?: boolean; /** 挂载目标元素 */
|
|
26
|
+
appendTo?: string | RendererElement; /** 遮罩层配置 */
|
|
27
|
+
mask?: boolean | CSSProperties; /** 是否模糊 */
|
|
28
|
+
blur?: boolean; /** 持续时间 */
|
|
29
|
+
duration?: number; /** 加载组件属性 */
|
|
21
30
|
spinProps?: Omit<SpinProps, 'show'> & ClassStyle;
|
|
22
31
|
};
|
|
23
32
|
//#endregion
|
|
24
|
-
export { LoadingProviderInst, LoadingProviderProps
|
|
33
|
+
export { LOADING_PROVIDER_INJECTION_KEY, LoadingProviderInst, LoadingProviderProps };
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import LoadingProvider_default from "./LoadingProvider.js";
|
|
2
2
|
|
|
3
3
|
//#region src/components/loading-provider/index.ts
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* 加载提供者注入键
|
|
6
|
+
*/
|
|
7
|
+
const LOADING_PROVIDER_INJECTION_KEY = Symbol("loading-provider-key");
|
|
5
8
|
|
|
6
9
|
//#endregion
|
|
7
|
-
export {
|
|
10
|
+
export { LOADING_PROVIDER_INJECTION_KEY };
|