@oiij/naive-ui 0.0.73 → 0.0.74
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/copy-button/CopyButton.vue.d.ts +4 -4
- package/dist/components/data-table-plus/DataTablePlus.js +4 -4
- package/dist/components/data-table-plus/DataTablePlus.vue.d.ts +52 -52
- package/dist/components/data-table-plus/index.d.ts +1 -1
- package/dist/components/loading-provider/LoadingProvider.vue.d.ts +2 -2
- package/dist/components/preset-form/PresetForm.js +11 -11
- package/dist/components/preset-form/PresetForm.vue.d.ts +21 -30
- package/dist/components/preset-input/PresetInput.vue.d.ts +3 -3
- package/dist/components/preset-picker/PresetPicker.vue.d.ts +5 -5
- package/dist/components/preset-select/PresetSelect.js +3 -3
- package/dist/components/preset-select/PresetSelect.vue.d.ts +33 -33
- package/dist/components/preset-select/index.d.ts +1 -1
- package/dist/components/remote-request/RemoteRequest.vue.d.ts +11 -11
- package/dist/components/search-input/SearchInput.vue.d.ts +4 -4
- package/dist/components/toggle-input/ToggleInput.vue.d.ts +5 -5
- package/dist/components/tooltip-button/TooltipButton.vue.d.ts +4 -4
- package/dist/components/transition/BaseTransition.vue.d.ts +2 -2
- package/dist/components/type-writer/TypeWriter.js +2 -2
- package/dist/components/type-writer/TypeWriter.vue.d.ts +4 -4
- package/dist/composables/use-data-request.d.ts +1 -1
- package/dist/composables/use-naive-form.d.ts +3 -3
- package/dist/composables/use-naive-form.js +3 -3
- package/dist/composables/use-naive-theme.d.ts +3 -3
- package/dist/composables/use-naive-theme.js +3 -3
- package/package.json +5 -5
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ConfigProvidersProps } from "./index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue13 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/config-providers/ConfigProviders.vue.d.ts
|
|
5
5
|
declare var __VLS_44: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
7
|
default?: (props: typeof __VLS_44) => any;
|
|
8
8
|
};
|
|
9
|
-
declare const __VLS_base:
|
|
9
|
+
declare const __VLS_base: vue13.DefineComponent<ConfigProvidersProps, {}, {}, {}, {}, vue13.ComponentOptionsMixin, vue13.ComponentOptionsMixin, {}, string, vue13.PublicProps, Readonly<ConfigProvidersProps> & Readonly<{}>, {}, {}, {}, {}, string, vue13.ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
12
12
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CopyButtonProps } from "./index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue8 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/copy-button/CopyButton.vue.d.ts
|
|
5
5
|
declare var __VLS_9: {}, __VLS_18: {}, __VLS_25: {};
|
|
@@ -10,11 +10,11 @@ type __VLS_Slots = {} & {
|
|
|
10
10
|
} & {
|
|
11
11
|
tooltip?: (props: typeof __VLS_25) => any;
|
|
12
12
|
};
|
|
13
|
-
declare const __VLS_base:
|
|
13
|
+
declare const __VLS_base: vue8.DefineComponent<CopyButtonProps, {}, {}, {}, {}, vue8.ComponentOptionsMixin, vue8.ComponentOptionsMixin, {} & {
|
|
14
14
|
copied: (v: string | undefined) => any;
|
|
15
|
-
}, string,
|
|
15
|
+
}, string, vue8.PublicProps, Readonly<CopyButtonProps> & Readonly<{
|
|
16
16
|
onCopied?: ((v: string | undefined) => any) | undefined;
|
|
17
|
-
}>, {}, {}, {}, {}, string,
|
|
17
|
+
}>, {}, {}, {}, {}, string, vue8.ComponentProvideOptions, false, {}, any>;
|
|
18
18
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
19
|
declare const _default: typeof __VLS_export;
|
|
20
20
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -60,7 +60,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
60
60
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
61
61
|
const emit = __emit;
|
|
62
62
|
const columnsReactive = reactive(__props.columns ?? []);
|
|
63
|
-
const
|
|
63
|
+
const dataTableInst = useTemplateRef("data-table-ref");
|
|
64
64
|
const _fields = {
|
|
65
65
|
page: "page",
|
|
66
66
|
pageSize: "pageSize",
|
|
@@ -220,7 +220,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
220
220
|
});
|
|
221
221
|
}
|
|
222
222
|
function handleScrollTop() {
|
|
223
|
-
|
|
223
|
+
dataTableInst.value?.scrollTo({
|
|
224
224
|
left: 0,
|
|
225
225
|
top: 0,
|
|
226
226
|
behavior: "smooth"
|
|
@@ -248,7 +248,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
248
248
|
onFinally,
|
|
249
249
|
filters: filtersRef,
|
|
250
250
|
sorters: sortersRef,
|
|
251
|
-
|
|
251
|
+
dataTableInst
|
|
252
252
|
};
|
|
253
253
|
const templateBind = computed(() => {
|
|
254
254
|
return {
|
|
@@ -261,7 +261,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
261
261
|
paginationRef: toValue(paginationRef),
|
|
262
262
|
filters: toValue(filtersRef),
|
|
263
263
|
sorters: toValue(sortersRef),
|
|
264
|
-
|
|
264
|
+
dataTableInst: toValue(dataTableInst)
|
|
265
265
|
};
|
|
266
266
|
});
|
|
267
267
|
__expose(expose);
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
import { DataObject, UseDataRequestPagination } 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_core4 from "@vueuse/core";
|
|
5
|
+
import * as vue26 from "vue";
|
|
6
6
|
import { DataTableBaseColumn, DataTableFilterState, DataTableInst, DataTableSortState } from "naive-ui";
|
|
7
7
|
|
|
8
8
|
//#region src/components/data-table-plus/DataTablePlus.vue.d.ts
|
|
9
9
|
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
|
-
onSuccess?: ((data: D, params: P[]) => any) | undefined;
|
|
10
|
+
props: vue26.PublicProps & __VLS_PrettifyLocal<DataTablePlusProps<P, D, R> & {
|
|
12
11
|
onError?: ((err: Error, params: P[]) => any) | undefined;
|
|
12
|
+
onSuccess?: ((data: D, params: P[]) => any) | undefined;
|
|
13
13
|
onLoad?: ((row: R) => any) | undefined;
|
|
14
14
|
onScroll?: ((ev: Event) => any) | undefined;
|
|
15
|
-
onFinally?: ((params: P[], data?: D | undefined, err?: Error | undefined) => any) | undefined;
|
|
16
|
-
onBefore?: ((params: P[]) => any) | undefined;
|
|
17
|
-
"onUpdate:page"?: ((page: number) => any) | undefined;
|
|
18
|
-
"onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
|
|
19
15
|
onClickRow?: ((row: R, index: number, event: MouseEvent, currentData: R[]) => any) | undefined;
|
|
20
16
|
onContextMenuRow?: ((row: R, index: number, event: MouseEvent, currentData: R[]) => any) | undefined;
|
|
17
|
+
onBefore?: ((params: P[]) => any) | undefined;
|
|
21
18
|
onScrollBottom?: ((ev: Event) => any) | undefined;
|
|
22
19
|
"onUpdate:checkedRowKeys"?: ((keys: (string | number)[], rows: (R | undefined)[], meta: {
|
|
23
20
|
row: R | undefined;
|
|
@@ -26,10 +23,13 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
26
23
|
"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
|
+
"onUpdate:page"?: ((page: number) => any) | undefined;
|
|
27
|
+
"onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
|
|
28
|
+
onFinally?: ((params: P[], data?: D | undefined, err?: Error | undefined) => any) | undefined;
|
|
29
29
|
}> & (typeof globalThis extends {
|
|
30
30
|
__VLS_PROPS_FALLBACK: infer P_1;
|
|
31
31
|
} ? P_1 : {});
|
|
32
|
-
expose: (exposed:
|
|
32
|
+
expose: (exposed: vue26.ShallowUnwrapRef<DataTablePlusExpose<P, D, R>>) => void;
|
|
33
33
|
attrs: any;
|
|
34
34
|
slots: {
|
|
35
35
|
header?: (props: {
|
|
@@ -45,8 +45,8 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
45
45
|
};
|
|
46
46
|
filters: DataTableFilterState | undefined;
|
|
47
47
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
48
|
-
|
|
49
|
-
pagination:
|
|
48
|
+
dataTableInst: DataTableInst | null;
|
|
49
|
+
pagination: vue26.Ref<{
|
|
50
50
|
page: number;
|
|
51
51
|
pageSize: number;
|
|
52
52
|
itemCount: number;
|
|
@@ -64,10 +64,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
64
64
|
setParams: (_params: Partial<P>) => void;
|
|
65
65
|
runParams: (_params: Partial<P>) => void;
|
|
66
66
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
67
|
-
onBefore:
|
|
68
|
-
onSuccess:
|
|
69
|
-
onError:
|
|
70
|
-
onFinally:
|
|
67
|
+
onBefore: _vueuse_core4.EventHookOn<[P[]]>;
|
|
68
|
+
onSuccess: _vueuse_core4.EventHookOn<[D, P[]]>;
|
|
69
|
+
onError: _vueuse_core4.EventHookOn<[Error, P[]]>;
|
|
70
|
+
onFinally: _vueuse_core4.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
71
71
|
}) => any;
|
|
72
72
|
} & {
|
|
73
73
|
title?: (props: {}) => any;
|
|
@@ -85,8 +85,8 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
85
85
|
};
|
|
86
86
|
filters: DataTableFilterState | undefined;
|
|
87
87
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
88
|
-
|
|
89
|
-
pagination:
|
|
88
|
+
dataTableInst: DataTableInst | null;
|
|
89
|
+
pagination: vue26.Ref<{
|
|
90
90
|
page: number;
|
|
91
91
|
pageSize: number;
|
|
92
92
|
itemCount: number;
|
|
@@ -104,10 +104,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
104
104
|
setParams: (_params: Partial<P>) => void;
|
|
105
105
|
runParams: (_params: Partial<P>) => void;
|
|
106
106
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
107
|
-
onBefore:
|
|
108
|
-
onSuccess:
|
|
109
|
-
onError:
|
|
110
|
-
onFinally:
|
|
107
|
+
onBefore: _vueuse_core4.EventHookOn<[P[]]>;
|
|
108
|
+
onSuccess: _vueuse_core4.EventHookOn<[D, P[]]>;
|
|
109
|
+
onError: _vueuse_core4.EventHookOn<[Error, P[]]>;
|
|
110
|
+
onFinally: _vueuse_core4.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
111
111
|
}) => any;
|
|
112
112
|
} & {
|
|
113
113
|
filter?: (props: {
|
|
@@ -123,8 +123,8 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
123
123
|
};
|
|
124
124
|
filters: DataTableFilterState | undefined;
|
|
125
125
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
126
|
-
|
|
127
|
-
pagination:
|
|
126
|
+
dataTableInst: DataTableInst | null;
|
|
127
|
+
pagination: vue26.Ref<{
|
|
128
128
|
page: number;
|
|
129
129
|
pageSize: number;
|
|
130
130
|
itemCount: number;
|
|
@@ -142,10 +142,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
142
142
|
setParams: (_params: Partial<P>) => void;
|
|
143
143
|
runParams: (_params: Partial<P>) => void;
|
|
144
144
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
145
|
-
onBefore:
|
|
146
|
-
onSuccess:
|
|
147
|
-
onError:
|
|
148
|
-
onFinally:
|
|
145
|
+
onBefore: _vueuse_core4.EventHookOn<[P[]]>;
|
|
146
|
+
onSuccess: _vueuse_core4.EventHookOn<[D, P[]]>;
|
|
147
|
+
onError: _vueuse_core4.EventHookOn<[Error, P[]]>;
|
|
148
|
+
onFinally: _vueuse_core4.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
149
149
|
}) => any;
|
|
150
150
|
} & {
|
|
151
151
|
empty?: (props: {
|
|
@@ -161,8 +161,8 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
161
161
|
};
|
|
162
162
|
filters: DataTableFilterState | undefined;
|
|
163
163
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
164
|
-
|
|
165
|
-
pagination:
|
|
164
|
+
dataTableInst: DataTableInst | null;
|
|
165
|
+
pagination: vue26.Ref<{
|
|
166
166
|
page: number;
|
|
167
167
|
pageSize: number;
|
|
168
168
|
itemCount: number;
|
|
@@ -180,10 +180,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
180
180
|
setParams: (_params: Partial<P>) => void;
|
|
181
181
|
runParams: (_params: Partial<P>) => void;
|
|
182
182
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
183
|
-
onBefore:
|
|
184
|
-
onSuccess:
|
|
185
|
-
onError:
|
|
186
|
-
onFinally:
|
|
183
|
+
onBefore: _vueuse_core4.EventHookOn<[P[]]>;
|
|
184
|
+
onSuccess: _vueuse_core4.EventHookOn<[D, P[]]>;
|
|
185
|
+
onError: _vueuse_core4.EventHookOn<[Error, P[]]>;
|
|
186
|
+
onFinally: _vueuse_core4.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
187
187
|
}) => any;
|
|
188
188
|
} & {
|
|
189
189
|
loading?: (props: {
|
|
@@ -199,8 +199,8 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
199
199
|
};
|
|
200
200
|
filters: DataTableFilterState | undefined;
|
|
201
201
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
202
|
-
|
|
203
|
-
pagination:
|
|
202
|
+
dataTableInst: DataTableInst | null;
|
|
203
|
+
pagination: vue26.Ref<{
|
|
204
204
|
page: number;
|
|
205
205
|
pageSize: number;
|
|
206
206
|
itemCount: number;
|
|
@@ -218,10 +218,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
218
218
|
setParams: (_params: Partial<P>) => void;
|
|
219
219
|
runParams: (_params: Partial<P>) => void;
|
|
220
220
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
221
|
-
onBefore:
|
|
222
|
-
onSuccess:
|
|
223
|
-
onError:
|
|
224
|
-
onFinally:
|
|
221
|
+
onBefore: _vueuse_core4.EventHookOn<[P[]]>;
|
|
222
|
+
onSuccess: _vueuse_core4.EventHookOn<[D, P[]]>;
|
|
223
|
+
onError: _vueuse_core4.EventHookOn<[Error, P[]]>;
|
|
224
|
+
onFinally: _vueuse_core4.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
225
225
|
}) => any;
|
|
226
226
|
} & {
|
|
227
227
|
footer?: (props: {
|
|
@@ -237,8 +237,8 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
237
237
|
};
|
|
238
238
|
filters: DataTableFilterState | undefined;
|
|
239
239
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
240
|
-
|
|
241
|
-
pagination:
|
|
240
|
+
dataTableInst: DataTableInst | null;
|
|
241
|
+
pagination: vue26.Ref<{
|
|
242
242
|
page: number;
|
|
243
243
|
pageSize: number;
|
|
244
244
|
itemCount: number;
|
|
@@ -256,10 +256,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
256
256
|
setParams: (_params: Partial<P>) => void;
|
|
257
257
|
runParams: (_params: Partial<P>) => void;
|
|
258
258
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
259
|
-
onBefore:
|
|
260
|
-
onSuccess:
|
|
261
|
-
onError:
|
|
262
|
-
onFinally:
|
|
259
|
+
onBefore: _vueuse_core4.EventHookOn<[P[]]>;
|
|
260
|
+
onSuccess: _vueuse_core4.EventHookOn<[D, P[]]>;
|
|
261
|
+
onError: _vueuse_core4.EventHookOn<[Error, P[]]>;
|
|
262
|
+
onFinally: _vueuse_core4.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
263
263
|
}) => any;
|
|
264
264
|
} & {
|
|
265
265
|
'footer-extra'?: (props: {
|
|
@@ -275,8 +275,8 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
275
275
|
};
|
|
276
276
|
filters: DataTableFilterState | undefined;
|
|
277
277
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
278
|
-
|
|
279
|
-
pagination:
|
|
278
|
+
dataTableInst: DataTableInst | null;
|
|
279
|
+
pagination: vue26.Ref<{
|
|
280
280
|
page: number;
|
|
281
281
|
pageSize: number;
|
|
282
282
|
itemCount: number;
|
|
@@ -294,14 +294,14 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
294
294
|
setParams: (_params: Partial<P>) => void;
|
|
295
295
|
runParams: (_params: Partial<P>) => void;
|
|
296
296
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
297
|
-
onBefore:
|
|
298
|
-
onSuccess:
|
|
299
|
-
onError:
|
|
300
|
-
onFinally:
|
|
297
|
+
onBefore: _vueuse_core4.EventHookOn<[P[]]>;
|
|
298
|
+
onSuccess: _vueuse_core4.EventHookOn<[D, P[]]>;
|
|
299
|
+
onError: _vueuse_core4.EventHookOn<[Error, P[]]>;
|
|
300
|
+
onFinally: _vueuse_core4.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
301
301
|
}) => any;
|
|
302
302
|
};
|
|
303
303
|
emit: DataTablePlusEmits<P, D, R>;
|
|
304
|
-
}>) =>
|
|
304
|
+
}>) => vue26.VNode & {
|
|
305
305
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
306
306
|
};
|
|
307
307
|
declare const _default: typeof __VLS_export;
|
|
@@ -15,7 +15,7 @@ type ClassStyle = {
|
|
|
15
15
|
type DataTablePlusExpose<P extends DataObject = DataObject, D extends DataObject = DataObject, R extends DataObject = DataObject> = UseDataRequestReturns<P, D, R> & {
|
|
16
16
|
filters: Ref<DataTableFilterState | undefined>;
|
|
17
17
|
sorters: Ref<Record<string, DataTableSortState> | undefined>;
|
|
18
|
-
|
|
18
|
+
dataTableInst: Readonly<ShallowRef<DataTableInst | null>>;
|
|
19
19
|
};
|
|
20
20
|
type DataTablePlusFields = DataRequestFields & {
|
|
21
21
|
filter?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LoadingProviderProps } from "./index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue18 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: vue18.DefineComponent<LoadingProviderProps, {}, {}, {}, {}, vue18.ComponentOptionsMixin, vue18.ComponentOptionsMixin, {}, string, vue18.PublicProps, Readonly<LoadingProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, vue18.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 & {
|
|
@@ -18,7 +18,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
emits: ["validated"],
|
|
19
19
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
20
20
|
const emit = __emit;
|
|
21
|
-
const {
|
|
21
|
+
const { formValue, formRules, formInst, formProps: _formProps, setValue, validate, resetValidation, resetForm, reset, clear, onValidated } = useNaiveForm(useTemplateRef("form-ref"), {
|
|
22
22
|
value: __props.value,
|
|
23
23
|
rules: __props.rules,
|
|
24
24
|
clearRules: __props.clearRules
|
|
@@ -37,9 +37,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
37
37
|
if (key) setValue({ [key]: val });
|
|
38
38
|
}
|
|
39
39
|
const expose = {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
formInst,
|
|
41
|
+
formValue,
|
|
42
|
+
formRules,
|
|
43
43
|
formProps: _formProps,
|
|
44
44
|
setValue,
|
|
45
45
|
validate,
|
|
@@ -52,9 +52,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
52
52
|
const templateBind = computed(() => {
|
|
53
53
|
return {
|
|
54
54
|
...expose,
|
|
55
|
-
|
|
56
|
-
formValue: toValue(
|
|
57
|
-
formRules: toValue(
|
|
55
|
+
formInst: toValue(formInst),
|
|
56
|
+
formValue: toValue(formValue),
|
|
57
|
+
formRules: toValue(formRules),
|
|
58
58
|
formProps: toValue(_formProps)
|
|
59
59
|
};
|
|
60
60
|
});
|
|
@@ -62,8 +62,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
62
|
return (_ctx, _cache) => {
|
|
63
63
|
return openBlock(), createBlock(unref(NForm), mergeProps({
|
|
64
64
|
ref: "form-ref",
|
|
65
|
-
model: unref(
|
|
66
|
-
rules: unref(
|
|
65
|
+
model: unref(formValue),
|
|
66
|
+
rules: unref(formRules)
|
|
67
67
|
}, __props.formProps), {
|
|
68
68
|
default: withCtx(() => [
|
|
69
69
|
renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps(templateBind.value))),
|
|
@@ -92,7 +92,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
92
92
|
})), { key: 0 })) : (openBlock(), createBlock(unref(PresetInput_default), {
|
|
93
93
|
key: 1,
|
|
94
94
|
options: opt,
|
|
95
|
-
value: key ? unref(
|
|
95
|
+
value: key ? unref(formValue)[key] : void 0,
|
|
96
96
|
"onUpdate:value": (val) => onPresetInputUpdate(val, key)
|
|
97
97
|
}, null, 8, [
|
|
98
98
|
"options",
|
|
@@ -144,7 +144,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
144
144
|
})), { key: 0 })) : (openBlock(), createBlock(unref(PresetInput_default), {
|
|
145
145
|
key: 1,
|
|
146
146
|
options: opt,
|
|
147
|
-
value: key ? unref(
|
|
147
|
+
value: key ? unref(formValue)[key] : void 0,
|
|
148
148
|
"onUpdate:value": (val) => onPresetInputUpdate(val, key)
|
|
149
149
|
}, null, 8, [
|
|
150
150
|
"options",
|
|
@@ -1,32 +1,29 @@
|
|
|
1
1
|
import { DataObject } from "../../composables/use-data-request.js";
|
|
2
2
|
import { PresetFormExpose, PresetFormProps } from "./index.js";
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
3
|
+
import * as _vueuse_core32 from "@vueuse/core";
|
|
4
|
+
import * as vue43 from "vue";
|
|
5
5
|
import * as naive_ui0 from "naive-ui";
|
|
6
|
-
import { FormInst } from "naive-ui";
|
|
6
|
+
import { FormInst, FormRules } from "naive-ui";
|
|
7
7
|
import * as async_validator0 from "async-validator";
|
|
8
8
|
|
|
9
9
|
//#region src/components/preset-form/PresetForm.vue.d.ts
|
|
10
10
|
declare const __VLS_export: <V 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<{
|
|
11
|
-
props:
|
|
11
|
+
props: vue43.PublicProps & __VLS_PrettifyLocal<PresetFormProps<V> & {
|
|
12
12
|
onValidated?: ((val: V) => any) | undefined;
|
|
13
13
|
}> & (typeof globalThis extends {
|
|
14
14
|
__VLS_PROPS_FALLBACK: infer P;
|
|
15
15
|
} ? P : {});
|
|
16
|
-
expose: (exposed:
|
|
16
|
+
expose: (exposed: vue43.ShallowUnwrapRef<PresetFormExpose<V>>) => void;
|
|
17
17
|
attrs: any;
|
|
18
18
|
slots: {
|
|
19
19
|
header?: (props: {
|
|
20
|
-
|
|
20
|
+
formInst: FormInst | null;
|
|
21
21
|
formValue: V;
|
|
22
|
-
formRules: Partial<Record<keyof V,
|
|
22
|
+
formRules: Partial<Record<keyof V, FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>;
|
|
23
23
|
formProps: {
|
|
24
|
-
model:
|
|
25
|
-
rules:
|
|
24
|
+
model: vue43.Reactive<V>;
|
|
25
|
+
rules: vue43.Reactive<Partial<Record<keyof V, FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>>;
|
|
26
26
|
};
|
|
27
|
-
formInstRef: Readonly<vue48.ShallowRef<FormInst | null>>;
|
|
28
|
-
formValueRef: vue48.Ref<V, V>;
|
|
29
|
-
formRulesRef: vue48.Ref<Partial<Record<keyof V, naive_ui0.FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>, Partial<Record<keyof V, naive_ui0.FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>>;
|
|
30
27
|
setValue: (_value: Partial<V>) => void;
|
|
31
28
|
validate: () => Promise<{
|
|
32
29
|
warnings?: async_validator0.ValidateError[][];
|
|
@@ -35,20 +32,17 @@ declare const __VLS_export: <V extends DataObject>(__VLS_props: NonNullable<Awai
|
|
|
35
32
|
resetForm: () => void;
|
|
36
33
|
reset: () => void;
|
|
37
34
|
clear: () => void;
|
|
38
|
-
onValidated:
|
|
35
|
+
onValidated: _vueuse_core32.EventHookOn<[V]>;
|
|
39
36
|
}) => any;
|
|
40
37
|
} & {
|
|
41
38
|
default?: (props: {
|
|
42
|
-
|
|
39
|
+
formInst: FormInst | null;
|
|
43
40
|
formValue: V;
|
|
44
|
-
formRules: Partial<Record<keyof V,
|
|
41
|
+
formRules: Partial<Record<keyof V, FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>;
|
|
45
42
|
formProps: {
|
|
46
|
-
model:
|
|
47
|
-
rules:
|
|
43
|
+
model: vue43.Reactive<V>;
|
|
44
|
+
rules: vue43.Reactive<Partial<Record<keyof V, FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>>;
|
|
48
45
|
};
|
|
49
|
-
formInstRef: Readonly<vue48.ShallowRef<FormInst | null>>;
|
|
50
|
-
formValueRef: vue48.Ref<V, V>;
|
|
51
|
-
formRulesRef: vue48.Ref<Partial<Record<keyof V, naive_ui0.FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>, Partial<Record<keyof V, naive_ui0.FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>>;
|
|
52
46
|
setValue: (_value: Partial<V>) => void;
|
|
53
47
|
validate: () => Promise<{
|
|
54
48
|
warnings?: async_validator0.ValidateError[][];
|
|
@@ -57,20 +51,17 @@ declare const __VLS_export: <V extends DataObject>(__VLS_props: NonNullable<Awai
|
|
|
57
51
|
resetForm: () => void;
|
|
58
52
|
reset: () => void;
|
|
59
53
|
clear: () => void;
|
|
60
|
-
onValidated:
|
|
54
|
+
onValidated: _vueuse_core32.EventHookOn<[V]>;
|
|
61
55
|
}) => any;
|
|
62
56
|
} & {
|
|
63
57
|
footer?: (props: {
|
|
64
|
-
|
|
58
|
+
formInst: FormInst | null;
|
|
65
59
|
formValue: V;
|
|
66
|
-
formRules: Partial<Record<keyof V,
|
|
60
|
+
formRules: Partial<Record<keyof V, FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>;
|
|
67
61
|
formProps: {
|
|
68
|
-
model:
|
|
69
|
-
rules:
|
|
62
|
+
model: vue43.Reactive<V>;
|
|
63
|
+
rules: vue43.Reactive<Partial<Record<keyof V, FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>>;
|
|
70
64
|
};
|
|
71
|
-
formInstRef: Readonly<vue48.ShallowRef<FormInst | null>>;
|
|
72
|
-
formValueRef: vue48.Ref<V, V>;
|
|
73
|
-
formRulesRef: vue48.Ref<Partial<Record<keyof V, naive_ui0.FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>, Partial<Record<keyof V, naive_ui0.FormRules | naive_ui0.FormItemRule | naive_ui0.FormItemRule[]>>>;
|
|
74
65
|
setValue: (_value: Partial<V>) => void;
|
|
75
66
|
validate: () => Promise<{
|
|
76
67
|
warnings?: async_validator0.ValidateError[][];
|
|
@@ -79,11 +70,11 @@ declare const __VLS_export: <V extends DataObject>(__VLS_props: NonNullable<Awai
|
|
|
79
70
|
resetForm: () => void;
|
|
80
71
|
reset: () => void;
|
|
81
72
|
clear: () => void;
|
|
82
|
-
onValidated:
|
|
73
|
+
onValidated: _vueuse_core32.EventHookOn<[V]>;
|
|
83
74
|
}) => any;
|
|
84
75
|
};
|
|
85
76
|
emit: (e: "validated", val: V) => void;
|
|
86
|
-
}>) =>
|
|
77
|
+
}>) => vue43.VNode & {
|
|
87
78
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
88
79
|
};
|
|
89
80
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PresetInputProps } from "./index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue36 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/preset-input/PresetInput.vue.d.ts
|
|
5
5
|
declare const __VLS_export: <V>(__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<{
|
|
6
|
-
props:
|
|
6
|
+
props: vue36.PublicProps & __VLS_PrettifyLocal<PresetInputProps<V> & {
|
|
7
7
|
"onUpdate:value"?: ((val?: V | undefined) => any) | undefined;
|
|
8
8
|
}> & (typeof globalThis extends {
|
|
9
9
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -12,7 +12,7 @@ declare const __VLS_export: <V>(__VLS_props: NonNullable<Awaited<typeof __VLS_se
|
|
|
12
12
|
attrs: any;
|
|
13
13
|
slots: {};
|
|
14
14
|
emit: (e: "update:value", val?: V) => void;
|
|
15
|
-
}>) =>
|
|
15
|
+
}>) => vue36.VNode & {
|
|
16
16
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
17
17
|
};
|
|
18
18
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { DataObject } from "../../composables/use-data-request.js";
|
|
2
2
|
import { PresetPickerEmits, PresetPickerExpose, PresetPickerProps, PresetPickerValue } from "./index.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as vue23 from "vue";
|
|
4
4
|
import { DataTableColumns } from "naive-ui";
|
|
5
5
|
|
|
6
6
|
//#region src/components/preset-picker/PresetPicker.vue.d.ts
|
|
7
7
|
declare const __VLS_export: <V extends PresetPickerValue, 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<{
|
|
8
|
-
props:
|
|
8
|
+
props: vue23.PublicProps & __VLS_PrettifyLocal<PresetPickerProps<V, R> & {
|
|
9
9
|
onClose?: (() => any) | undefined;
|
|
10
|
-
"onUpdate:value"?: ((val: V | null, raw: R | R[] | null) => any) | undefined;
|
|
11
10
|
onAfterEnter?: (() => any) | undefined;
|
|
12
11
|
onAfterLeave?: (() => any) | undefined;
|
|
13
12
|
onEsc?: (() => any) | undefined;
|
|
@@ -15,10 +14,11 @@ declare const __VLS_export: <V extends PresetPickerValue, R extends DataObject>(
|
|
|
15
14
|
onNegativeClick?: (() => any) | undefined;
|
|
16
15
|
onPositiveClick?: (() => any) | undefined;
|
|
17
16
|
"onUpdate:show"?: ((value: boolean) => any) | undefined;
|
|
17
|
+
"onUpdate:value"?: ((val: V | null, raw: R | R[] | null) => any) | undefined;
|
|
18
18
|
}> & (typeof globalThis extends {
|
|
19
19
|
__VLS_PROPS_FALLBACK: infer P;
|
|
20
20
|
} ? P : {});
|
|
21
|
-
expose: (exposed:
|
|
21
|
+
expose: (exposed: vue23.ShallowUnwrapRef<PresetPickerExpose<R>>) => void;
|
|
22
22
|
attrs: any;
|
|
23
23
|
slots: {
|
|
24
24
|
'button-icon'?: (props: {}) => any;
|
|
@@ -54,7 +54,7 @@ declare const __VLS_export: <V extends PresetPickerValue, R extends DataObject>(
|
|
|
54
54
|
'modal-close'?: (props: {}) => any;
|
|
55
55
|
};
|
|
56
56
|
emit: PresetPickerEmits<V, R>;
|
|
57
|
-
}>) =>
|
|
57
|
+
}>) => vue23.VNode & {
|
|
58
58
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
59
59
|
};
|
|
60
60
|
declare const _default: typeof __VLS_export;
|
|
@@ -49,7 +49,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
49
|
],
|
|
50
50
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
51
51
|
const emit = __emit;
|
|
52
|
-
const
|
|
52
|
+
const selectInstRef = useTemplateRef("select-ref");
|
|
53
53
|
const _fields = {
|
|
54
54
|
page: "page",
|
|
55
55
|
pageSize: "pageSize",
|
|
@@ -183,7 +183,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
183
183
|
onSuccess,
|
|
184
184
|
onError,
|
|
185
185
|
onFinally,
|
|
186
|
-
|
|
186
|
+
selectInst: selectInstRef
|
|
187
187
|
};
|
|
188
188
|
const templateBind = computed(() => {
|
|
189
189
|
return {
|
|
@@ -194,7 +194,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
194
194
|
params: toValue(params),
|
|
195
195
|
list: toValue(list),
|
|
196
196
|
pagination: toValue(paginationRef),
|
|
197
|
-
|
|
197
|
+
selectInst: toValue(selectInstRef)
|
|
198
198
|
};
|
|
199
199
|
});
|
|
200
200
|
__expose(expose);
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { DataObject, UseDataRequestPagination } from "../../composables/use-data-request.js";
|
|
2
2
|
import { PresetSelectEmits, PresetSelectExpose, PresetSelectProps, PresetSelectValue } from "./index.js";
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
3
|
+
import * as _vueuse_core39 from "@vueuse/core";
|
|
4
|
+
import * as vue75 from "vue";
|
|
5
5
|
import { SelectInst, SelectOption } from "naive-ui";
|
|
6
6
|
|
|
7
7
|
//#region src/components/preset-select/PresetSelect.vue.d.ts
|
|
8
8
|
declare const __VLS_export: <V extends PresetSelectValue, 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<{
|
|
9
|
-
props:
|
|
10
|
-
onSuccess?: ((data: D, params: P[]) => any) | undefined;
|
|
9
|
+
props: vue75.PublicProps & __VLS_PrettifyLocal<PresetSelectProps<V, P, D, R> & {
|
|
11
10
|
onError?: ((err: Error, params: P[]) => any) | undefined;
|
|
11
|
+
onSuccess?: ((data: D, params: P[]) => any) | undefined;
|
|
12
12
|
onClear?: (() => any) | undefined;
|
|
13
13
|
onBlur?: ((ev: FocusEvent) => any) | undefined;
|
|
14
14
|
onFocus?: ((ev: FocusEvent) => any) | undefined;
|
|
15
15
|
onScroll?: ((ev: Event) => any) | undefined;
|
|
16
16
|
"onUpdate:value"?: ((val: V | null, option: SelectOption | SelectOption[] | null, raw: R | R[] | null) => any) | undefined;
|
|
17
17
|
onSearch?: ((value: string) => any) | undefined;
|
|
18
|
-
onFinally?: ((params: P[], data?: D | undefined, err?: Error | undefined) => any) | undefined;
|
|
19
18
|
onBefore?: ((params: P[]) => any) | undefined;
|
|
20
|
-
onCreate?: ((label: string) => any) | undefined;
|
|
21
19
|
"onUpdate:page"?: ((page: number) => any) | undefined;
|
|
22
20
|
"onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
|
|
21
|
+
onFinally?: ((params: P[], data?: D | undefined, err?: Error | undefined) => any) | undefined;
|
|
22
|
+
onCreate?: ((label: string) => any) | undefined;
|
|
23
23
|
}> & (typeof globalThis extends {
|
|
24
24
|
__VLS_PROPS_FALLBACK: infer P_1;
|
|
25
25
|
} ? P_1 : {});
|
|
26
|
-
expose: (exposed:
|
|
26
|
+
expose: (exposed: vue75.ShallowUnwrapRef<PresetSelectExpose<P, D, R>>) => void;
|
|
27
27
|
attrs: any;
|
|
28
28
|
slots: {
|
|
29
29
|
header?: (props: {
|
|
@@ -37,7 +37,7 @@ declare const __VLS_export: <V extends PresetSelectValue, P extends DataObject,
|
|
|
37
37
|
pageSize: number;
|
|
38
38
|
itemCount: number;
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
selectInst: SelectInst | null;
|
|
41
41
|
run: (...params: P[]) => void;
|
|
42
42
|
runAsync: (...params: P[]) => Promise<D>;
|
|
43
43
|
refresh: () => void;
|
|
@@ -47,10 +47,10 @@ declare const __VLS_export: <V extends PresetSelectValue, P extends DataObject,
|
|
|
47
47
|
setParams: (_params: Partial<P>) => void;
|
|
48
48
|
runParams: (_params: Partial<P>) => void;
|
|
49
49
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
50
|
-
onBefore:
|
|
51
|
-
onSuccess:
|
|
52
|
-
onError:
|
|
53
|
-
onFinally:
|
|
50
|
+
onBefore: _vueuse_core39.EventHookOn<[P[]]>;
|
|
51
|
+
onSuccess: _vueuse_core39.EventHookOn<[D, P[]]>;
|
|
52
|
+
onError: _vueuse_core39.EventHookOn<[Error, P[]]>;
|
|
53
|
+
onFinally: _vueuse_core39.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
54
54
|
}) => any;
|
|
55
55
|
} & {
|
|
56
56
|
footer?: (props: {
|
|
@@ -64,7 +64,7 @@ declare const __VLS_export: <V extends PresetSelectValue, P extends DataObject,
|
|
|
64
64
|
pageSize: number;
|
|
65
65
|
itemCount: number;
|
|
66
66
|
};
|
|
67
|
-
|
|
67
|
+
selectInst: SelectInst | null;
|
|
68
68
|
run: (...params: P[]) => void;
|
|
69
69
|
runAsync: (...params: P[]) => Promise<D>;
|
|
70
70
|
refresh: () => void;
|
|
@@ -74,10 +74,10 @@ declare const __VLS_export: <V extends PresetSelectValue, P extends DataObject,
|
|
|
74
74
|
setParams: (_params: Partial<P>) => void;
|
|
75
75
|
runParams: (_params: Partial<P>) => void;
|
|
76
76
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
77
|
-
onBefore:
|
|
78
|
-
onSuccess:
|
|
79
|
-
onError:
|
|
80
|
-
onFinally:
|
|
77
|
+
onBefore: _vueuse_core39.EventHookOn<[P[]]>;
|
|
78
|
+
onSuccess: _vueuse_core39.EventHookOn<[D, P[]]>;
|
|
79
|
+
onError: _vueuse_core39.EventHookOn<[Error, P[]]>;
|
|
80
|
+
onFinally: _vueuse_core39.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
81
81
|
}) => any;
|
|
82
82
|
} & {
|
|
83
83
|
'footer-extra'?: (props: {
|
|
@@ -91,7 +91,7 @@ declare const __VLS_export: <V extends PresetSelectValue, P extends DataObject,
|
|
|
91
91
|
pageSize: number;
|
|
92
92
|
itemCount: number;
|
|
93
93
|
};
|
|
94
|
-
|
|
94
|
+
selectInst: SelectInst | null;
|
|
95
95
|
run: (...params: P[]) => void;
|
|
96
96
|
runAsync: (...params: P[]) => Promise<D>;
|
|
97
97
|
refresh: () => void;
|
|
@@ -101,10 +101,10 @@ declare const __VLS_export: <V extends PresetSelectValue, P extends DataObject,
|
|
|
101
101
|
setParams: (_params: Partial<P>) => void;
|
|
102
102
|
runParams: (_params: Partial<P>) => void;
|
|
103
103
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
104
|
-
onBefore:
|
|
105
|
-
onSuccess:
|
|
106
|
-
onError:
|
|
107
|
-
onFinally:
|
|
104
|
+
onBefore: _vueuse_core39.EventHookOn<[P[]]>;
|
|
105
|
+
onSuccess: _vueuse_core39.EventHookOn<[D, P[]]>;
|
|
106
|
+
onError: _vueuse_core39.EventHookOn<[Error, P[]]>;
|
|
107
|
+
onFinally: _vueuse_core39.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
108
108
|
}) => any;
|
|
109
109
|
} & {
|
|
110
110
|
empty?: (props: {
|
|
@@ -118,7 +118,7 @@ declare const __VLS_export: <V extends PresetSelectValue, P extends DataObject,
|
|
|
118
118
|
pageSize: number;
|
|
119
119
|
itemCount: number;
|
|
120
120
|
};
|
|
121
|
-
|
|
121
|
+
selectInst: SelectInst | null;
|
|
122
122
|
run: (...params: P[]) => void;
|
|
123
123
|
runAsync: (...params: P[]) => Promise<D>;
|
|
124
124
|
refresh: () => void;
|
|
@@ -128,10 +128,10 @@ declare const __VLS_export: <V extends PresetSelectValue, P extends DataObject,
|
|
|
128
128
|
setParams: (_params: Partial<P>) => void;
|
|
129
129
|
runParams: (_params: Partial<P>) => void;
|
|
130
130
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
131
|
-
onBefore:
|
|
132
|
-
onSuccess:
|
|
133
|
-
onError:
|
|
134
|
-
onFinally:
|
|
131
|
+
onBefore: _vueuse_core39.EventHookOn<[P[]]>;
|
|
132
|
+
onSuccess: _vueuse_core39.EventHookOn<[D, P[]]>;
|
|
133
|
+
onError: _vueuse_core39.EventHookOn<[Error, P[]]>;
|
|
134
|
+
onFinally: _vueuse_core39.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
135
135
|
}) => any;
|
|
136
136
|
} & {
|
|
137
137
|
arrow?: (props: {
|
|
@@ -145,7 +145,7 @@ declare const __VLS_export: <V extends PresetSelectValue, P extends DataObject,
|
|
|
145
145
|
pageSize: number;
|
|
146
146
|
itemCount: number;
|
|
147
147
|
};
|
|
148
|
-
|
|
148
|
+
selectInst: SelectInst | null;
|
|
149
149
|
run: (...params: P[]) => void;
|
|
150
150
|
runAsync: (...params: P[]) => Promise<D>;
|
|
151
151
|
refresh: () => void;
|
|
@@ -155,14 +155,14 @@ declare const __VLS_export: <V extends PresetSelectValue, P extends DataObject,
|
|
|
155
155
|
setParams: (_params: Partial<P>) => void;
|
|
156
156
|
runParams: (_params: Partial<P>) => void;
|
|
157
157
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
158
|
-
onBefore:
|
|
159
|
-
onSuccess:
|
|
160
|
-
onError:
|
|
161
|
-
onFinally:
|
|
158
|
+
onBefore: _vueuse_core39.EventHookOn<[P[]]>;
|
|
159
|
+
onSuccess: _vueuse_core39.EventHookOn<[D, P[]]>;
|
|
160
|
+
onError: _vueuse_core39.EventHookOn<[Error, P[]]>;
|
|
161
|
+
onFinally: _vueuse_core39.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
162
162
|
}) => any;
|
|
163
163
|
};
|
|
164
164
|
emit: PresetSelectEmits<V, P, D, R>;
|
|
165
|
-
}>) =>
|
|
165
|
+
}>) => vue75.VNode & {
|
|
166
166
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
167
167
|
};
|
|
168
168
|
declare const _default: typeof __VLS_export;
|
|
@@ -18,7 +18,7 @@ type PresetSelectFields = DataRequestFields & {
|
|
|
18
18
|
children?: string;
|
|
19
19
|
};
|
|
20
20
|
type PresetSelectExpose<P extends DataObject = DataObject, D extends DataObject = DataObject, R extends DataObject = DataObject> = UseDataRequestReturns<P, D, R> & {
|
|
21
|
-
|
|
21
|
+
selectInst: Readonly<ShallowRef<SelectInst | null>>;
|
|
22
22
|
};
|
|
23
23
|
type PresetSelectProps<V extends PresetSelectValue, P extends DataObject = DataObject, D extends DataObject = DataObject, R extends DataObject = DataObject> = RemoteRequestProps<P, D> & {
|
|
24
24
|
value?: V;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { DataObject, UseDataRequestPagination } from "../../composables/use-data-request.js";
|
|
2
2
|
import { RemoteRequestEmits, RemoteRequestExpose, RemoteRequestProps } from "./index.js";
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
3
|
+
import * as _vueuse_core35 from "@vueuse/core";
|
|
4
|
+
import * as vue62 from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/components/remote-request/RemoteRequest.vue.d.ts
|
|
7
7
|
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<{
|
|
8
|
-
props:
|
|
9
|
-
onSuccess?: ((data: D, params: P[]) => any) | undefined;
|
|
8
|
+
props: vue62.PublicProps & __VLS_PrettifyLocal<RemoteRequestProps<P, D> & {
|
|
10
9
|
onError?: ((err: Error, params: P[]) => any) | undefined;
|
|
11
|
-
|
|
10
|
+
onSuccess?: ((data: D, params: P[]) => any) | undefined;
|
|
12
11
|
onBefore?: ((params: P[]) => any) | undefined;
|
|
12
|
+
onFinally?: ((params: P[], data?: D | undefined, err?: Error | undefined) => any) | undefined;
|
|
13
13
|
}> & (typeof globalThis extends {
|
|
14
14
|
__VLS_PROPS_FALLBACK: infer P_1;
|
|
15
15
|
} ? P_1 : {});
|
|
16
|
-
expose: (exposed:
|
|
16
|
+
expose: (exposed: vue62.ShallowUnwrapRef<RemoteRequestExpose<P, D, R>>) => void;
|
|
17
17
|
attrs: any;
|
|
18
18
|
slots: {
|
|
19
19
|
default?: (props: {
|
|
@@ -36,14 +36,14 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
36
36
|
setParams: (_params: Partial<P>) => void;
|
|
37
37
|
runParams: (_params: Partial<P>) => void;
|
|
38
38
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
39
|
-
onBefore:
|
|
40
|
-
onSuccess:
|
|
41
|
-
onError:
|
|
42
|
-
onFinally:
|
|
39
|
+
onBefore: _vueuse_core35.EventHookOn<[P[]]>;
|
|
40
|
+
onSuccess: _vueuse_core35.EventHookOn<[D, P[]]>;
|
|
41
|
+
onError: _vueuse_core35.EventHookOn<[Error, P[]]>;
|
|
42
|
+
onFinally: _vueuse_core35.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
43
43
|
}) => any;
|
|
44
44
|
};
|
|
45
45
|
emit: RemoteRequestEmits<P, D>;
|
|
46
|
-
}>) =>
|
|
46
|
+
}>) => vue62.VNode & {
|
|
47
47
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
48
48
|
};
|
|
49
49
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SearchInputProps } from "./index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue65 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/search-input/SearchInput.vue.d.ts
|
|
5
5
|
declare var __VLS_19: {}, __VLS_21: {}, __VLS_28: {
|
|
@@ -15,11 +15,11 @@ type __VLS_Slots = {} & {
|
|
|
15
15
|
} & {
|
|
16
16
|
'button-icon'?: (props: typeof __VLS_39) => any;
|
|
17
17
|
};
|
|
18
|
-
declare const __VLS_base:
|
|
18
|
+
declare const __VLS_base: vue65.DefineComponent<SearchInputProps, {}, {}, {}, {}, vue65.ComponentOptionsMixin, vue65.ComponentOptionsMixin, {} & {
|
|
19
19
|
"update:value": (v: string | null | undefined) => any;
|
|
20
|
-
}, string,
|
|
20
|
+
}, string, vue65.PublicProps, Readonly<SearchInputProps> & Readonly<{
|
|
21
21
|
"onUpdate:value"?: ((v: string | null | undefined) => any) | undefined;
|
|
22
|
-
}>, {}, {}, {}, {}, string,
|
|
22
|
+
}>, {}, {}, {}, {}, string, vue65.ComponentProvideOptions, false, {}, any>;
|
|
23
23
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
24
|
declare const _default: typeof __VLS_export;
|
|
25
25
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ClassStyle } from "../data-table-plus/index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue38 from "vue";
|
|
3
3
|
import { InputProps } from "naive-ui";
|
|
4
4
|
|
|
5
5
|
//#region src/components/toggle-input/ToggleInput.vue.d.ts
|
|
@@ -27,14 +27,14 @@ type __VLS_Slots = {} & {
|
|
|
27
27
|
} & {
|
|
28
28
|
default?: (props: typeof __VLS_13) => any;
|
|
29
29
|
};
|
|
30
|
-
declare const __VLS_base:
|
|
30
|
+
declare const __VLS_base: vue38.DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, vue38.ComponentOptionsMixin, vue38.ComponentOptionsMixin, {
|
|
31
31
|
"update:value": (value: string | number | undefined) => any;
|
|
32
32
|
} & {
|
|
33
33
|
trigger: () => any;
|
|
34
|
-
}, string,
|
|
35
|
-
"onUpdate:value"?: ((value: string | number | undefined) => any) | undefined;
|
|
34
|
+
}, string, vue38.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
36
35
|
onTrigger?: (() => any) | undefined;
|
|
37
|
-
|
|
36
|
+
"onUpdate:value"?: ((value: string | number | undefined) => any) | undefined;
|
|
37
|
+
}>, {}, {}, {}, {}, string, vue38.ComponentProvideOptions, false, {}, any>;
|
|
38
38
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
39
39
|
declare const _default: typeof __VLS_export;
|
|
40
40
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TooltipButtonProps } from "./index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue70 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/tooltip-button/TooltipButton.vue.d.ts
|
|
5
5
|
declare var __VLS_17: {}, __VLS_20: {}, __VLS_22: {};
|
|
@@ -10,11 +10,11 @@ type __VLS_Slots = {} & {
|
|
|
10
10
|
} & {
|
|
11
11
|
tooltip?: (props: typeof __VLS_22) => any;
|
|
12
12
|
};
|
|
13
|
-
declare const __VLS_base:
|
|
13
|
+
declare const __VLS_base: vue70.DefineComponent<TooltipButtonProps, {}, {}, {}, {}, vue70.ComponentOptionsMixin, vue70.ComponentOptionsMixin, {} & {
|
|
14
14
|
click: (ev: MouseEvent) => any;
|
|
15
|
-
}, string,
|
|
15
|
+
}, string, vue70.PublicProps, Readonly<TooltipButtonProps> & Readonly<{
|
|
16
16
|
onClick?: ((ev: MouseEvent) => any) | undefined;
|
|
17
|
-
}>, {}, {}, {}, {}, string,
|
|
17
|
+
}>, {}, {}, {}, {}, string, vue70.ComponentProvideOptions, false, {}, any>;
|
|
18
18
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
19
|
declare const _default: typeof __VLS_export;
|
|
20
20
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { TransitionProps as TransitionProps$1 } from "./index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue52 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/transition/BaseTransition.vue.d.ts
|
|
5
5
|
declare var __VLS_7: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
7
|
default?: (props: typeof __VLS_7) => any;
|
|
8
8
|
};
|
|
9
|
-
declare const __VLS_base:
|
|
9
|
+
declare const __VLS_base: vue52.DefineComponent<TransitionProps$1, {}, {}, {}, {}, vue52.ComponentOptionsMixin, vue52.ComponentOptionsMixin, {}, string, vue52.PublicProps, Readonly<TransitionProps$1> & Readonly<{}>, {}, {}, {}, {}, string, vue52.ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
11
|
declare const _default: typeof __VLS_export;
|
|
12
12
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -43,7 +43,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
43
43
|
onStop((v) => {
|
|
44
44
|
emit("stop", v);
|
|
45
45
|
});
|
|
46
|
-
const {
|
|
46
|
+
const { html } = useMarkdownIt(void 0, {
|
|
47
47
|
value: typedValue,
|
|
48
48
|
markdownItOptions: {
|
|
49
49
|
html: true,
|
|
@@ -53,7 +53,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
53
53
|
highlight
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
|
-
const renderValue = computed(() => __props.markdown ?
|
|
56
|
+
const renderValue = computed(() => __props.markdown ? html.value : typedValue.value);
|
|
57
57
|
return (_ctx, _cache) => {
|
|
58
58
|
return openBlock(), createBlock(unref(NEl), {
|
|
59
59
|
tag: "div",
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { TypeWriterProps } from "./index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as vue57 from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/type-writer/TypeWriter.vue.d.ts
|
|
5
|
-
declare const __VLS_export:
|
|
5
|
+
declare const __VLS_export: vue57.DefineComponent<TypeWriterProps, {}, {}, {}, {}, vue57.ComponentOptionsMixin, vue57.ComponentOptionsMixin, {} & {
|
|
6
6
|
start: () => any;
|
|
7
7
|
update: (v: {
|
|
8
8
|
index: number;
|
|
9
9
|
value: string;
|
|
10
10
|
}) => any;
|
|
11
11
|
stop: (v: string) => any;
|
|
12
|
-
}, string,
|
|
12
|
+
}, string, vue57.PublicProps, Readonly<TypeWriterProps> & Readonly<{
|
|
13
13
|
onStart?: (() => any) | undefined;
|
|
14
14
|
onUpdate?: ((v: {
|
|
15
15
|
index: number;
|
|
16
16
|
value: string;
|
|
17
17
|
}) => any) | undefined;
|
|
18
18
|
onStop?: ((v: string) => any) | undefined;
|
|
19
|
-
}>, {}, {}, {}, {}, string,
|
|
19
|
+
}>, {}, {}, {}, {}, string, vue57.ComponentProvideOptions, false, {}, any>;
|
|
20
20
|
declare const _default: typeof __VLS_export;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { _default };
|
|
@@ -27,7 +27,7 @@ declare function useDataRequest<P extends DataObject = DataObject, D extends Dat
|
|
|
27
27
|
loading: Readonly<vue0.Ref<boolean, boolean>>;
|
|
28
28
|
data: Readonly<vue0.Ref<D | undefined, D | undefined>>;
|
|
29
29
|
error: Readonly<vue0.Ref<Error | undefined, Error | undefined>>;
|
|
30
|
-
params: Readonly<vue0.Ref<[] |
|
|
30
|
+
params: Readonly<vue0.Ref<P[] | [], P[] | []>>;
|
|
31
31
|
list: vue0.ComputedRef<R[]>;
|
|
32
32
|
pagination: vue0.Ref<{
|
|
33
33
|
page: number;
|
|
@@ -18,9 +18,9 @@ type UseNaiveFormOptions<T extends DataObject> = {
|
|
|
18
18
|
clearRules?: UseNaiveFormClearRules;
|
|
19
19
|
};
|
|
20
20
|
declare function useNaiveForm<T extends DataObject = DataObject>(formInstRef: TemplateRef<FormInst>, options?: UseNaiveFormOptions<T>): {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
formInst: Readonly<vue5.ShallowRef<FormInst | null>>;
|
|
22
|
+
formValue: Ref<T, T>;
|
|
23
|
+
formRules: Ref<Partial<Record<keyof T, FormRules | FormItemRule | FormItemRule[]>>, Partial<Record<keyof T, FormRules | FormItemRule | FormItemRule[]>>>;
|
|
24
24
|
formProps: {
|
|
25
25
|
model: vue5.Reactive<T>;
|
|
26
26
|
rules: vue5.Reactive<Partial<Record<keyof T, FormRules | FormItemRule | FormItemRule[]>>>;
|
|
@@ -18,10 +18,10 @@ type UseNaiveThemeOptions<T extends string> = {
|
|
|
18
18
|
darkColors?: Colors | ((colors: Colors) => Colors);
|
|
19
19
|
};
|
|
20
20
|
declare function useNaiveTheme<T extends string>(options?: UseNaiveThemeOptions<T>): {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
language: Ref<T | undefined, T | undefined>;
|
|
22
|
+
darkMode: Ref<boolean | undefined, boolean | undefined>;
|
|
23
23
|
theme: ComputedRef<naive_ui_es_themes_interface0.BuiltInGlobalTheme | undefined>;
|
|
24
|
-
|
|
24
|
+
colors: Ref<{
|
|
25
25
|
primary?: string | undefined;
|
|
26
26
|
info?: string | undefined;
|
|
27
27
|
success?: string | undefined;
|
|
@@ -83,10 +83,10 @@ function useNaiveTheme(options) {
|
|
|
83
83
|
...locales
|
|
84
84
|
};
|
|
85
85
|
return {
|
|
86
|
-
languageRef,
|
|
87
|
-
darkModeRef,
|
|
86
|
+
language: languageRef,
|
|
87
|
+
darkMode: darkModeRef,
|
|
88
88
|
theme,
|
|
89
|
-
colorsRef,
|
|
89
|
+
colors: colorsRef,
|
|
90
90
|
themeColors,
|
|
91
91
|
themeOverrides,
|
|
92
92
|
locales: localesMerge,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oiij/naive-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.74",
|
|
5
5
|
"description": "Some Composable Functions And Components for Vue 3",
|
|
6
6
|
"author": "oiij",
|
|
7
7
|
"license": "MIT",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"vue-component-type-helpers": "^3.2.4",
|
|
47
47
|
"vue-hooks-plus": "^2.4.1",
|
|
48
48
|
"@oiij/css-render": "0.0.10",
|
|
49
|
-
"@oiij/markdown-it": "0.0.
|
|
50
|
-
"@oiij/use": "0.0.
|
|
49
|
+
"@oiij/markdown-it": "0.0.12",
|
|
50
|
+
"@oiij/use": "0.0.43"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/prismjs": "^1.26.5",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"vue-component-type-helpers": "^3.2.4",
|
|
62
62
|
"vue-hooks-plus": "^2.4.1",
|
|
63
63
|
"@oiij/css-render": "0.0.10",
|
|
64
|
-
"@oiij/
|
|
65
|
-
"@oiij/
|
|
64
|
+
"@oiij/use": "0.0.43",
|
|
65
|
+
"@oiij/markdown-it": "0.0.12"
|
|
66
66
|
},
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|