@oiij/naive-ui 0.0.66 → 0.0.67
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.js +10 -18
- package/dist/components/config-providers/ConfigProviders.vue.d.ts +5 -5
- package/dist/components/config-providers/index.d.ts +6 -8
- package/dist/components/copy-button/CopyButton.vue.d.ts +8 -8
- package/dist/components/data-table-plus/DataTablePlus.vue.d.ts +43 -43
- package/dist/components/index.d.ts +17 -19
- package/dist/components/loading-provider/LoadingProvider.js +78 -0
- package/dist/components/loading-provider/LoadingProvider.vue.d.ts +38 -0
- package/dist/components/loading-provider/index.d.ts +23 -0
- package/dist/components/loading-provider/index.js +7 -0
- package/dist/components/{full-loading/full-loading.cssr.js → loading-provider/loading-provider.cssr.js} +5 -5
- package/dist/components/preset-form/PresetForm.vue.d.ts +19 -19
- package/dist/components/preset-input/PresetInput.vue.d.ts +4 -4
- package/dist/components/preset-picker/PresetPicker.js +1 -1
- package/dist/components/preset-picker/PresetPicker.vue.d.ts +5 -5
- package/dist/components/preset-select/PresetSelect.vue.d.ts +28 -28
- package/dist/components/remote-request/RemoteRequest.vue.d.ts +12 -12
- package/dist/components/search-input/SearchInput.vue.d.ts +12 -12
- package/dist/components/toggle-input/ToggleInput.vue.d.ts +5 -5
- package/dist/components/tooltip-button/TooltipButton.vue.d.ts +5 -5
- package/dist/components/transition/BaseTransition.vue.d.ts +6 -6
- package/dist/components/type-writer/TypeWriter.js +1 -1
- package/dist/components/type-writer/TypeWriter.vue.d.ts +5 -5
- package/dist/components.d.ts +19 -21
- package/dist/components.js +5 -5
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/useDataRequest.d.ts +1 -1
- package/dist/composables/useLoading.d.ts +10 -0
- package/dist/composables/useLoading.js +10 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/package.json +11 -11
- package/dist/components/bubble/Bubble.js +0 -67
- package/dist/components/bubble/Bubble.vue.d.ts +0 -54
- package/dist/components/bubble/bubble.cssr.js +0 -23
- package/dist/components/bubble/index.d.ts +0 -20
- package/dist/components/full-loading/FullLoading.js +0 -70
- package/dist/components/full-loading/FullLoading.vue.d.ts +0 -38
- package/dist/components/full-loading/index.d.ts +0 -17
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import LoadingProvider_default from "../loading-provider/LoadingProvider.js";
|
|
2
|
+
import { useLoading } from "../../composables/useLoading.js";
|
|
3
|
+
import { createBlock, createCommentVNode, createVNode, defineComponent, guardReactiveProps, normalizeProps, onMounted, openBlock, renderSlot, unref, withCtx } from "vue";
|
|
3
4
|
import { NConfigProvider, NDialogProvider, NGlobalStyle, NLoadingBarProvider, NMessageProvider, NModalProvider, NNotificationProvider, useDialog, useLoadingBar, useMessage, useModal, useNotification } from "naive-ui";
|
|
4
5
|
|
|
5
6
|
//#region src/components/config-providers/ConfigProviders.vue
|
|
@@ -12,28 +13,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12
13
|
},
|
|
13
14
|
configProviderProps: {},
|
|
14
15
|
loadingBarProps: {},
|
|
15
|
-
|
|
16
|
+
loadingProviderProps: {},
|
|
16
17
|
dialogProviderProps: {},
|
|
17
18
|
modalProviderProps: {},
|
|
18
19
|
notificationProviderProps: {},
|
|
19
20
|
messageProviderProps: {}
|
|
20
21
|
},
|
|
21
22
|
setup(__props) {
|
|
22
|
-
const globalLoading = ref(false);
|
|
23
23
|
function registerNaiveTools() {
|
|
24
24
|
window.$dialog = useDialog();
|
|
25
25
|
window.$loadingBar = useLoadingBar();
|
|
26
26
|
window.$message = useMessage();
|
|
27
27
|
window.$modal = useModal();
|
|
28
28
|
window.$notification = useNotification();
|
|
29
|
-
window.$loading =
|
|
30
|
-
start: () => {
|
|
31
|
-
globalLoading.value = true;
|
|
32
|
-
},
|
|
33
|
-
finish: () => {
|
|
34
|
-
globalLoading.value = false;
|
|
35
|
-
}
|
|
36
|
-
};
|
|
29
|
+
window.$loading = useLoading();
|
|
37
30
|
}
|
|
38
31
|
const NaiveProviderContent = defineComponent({
|
|
39
32
|
setup() {
|
|
@@ -47,8 +40,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
47
40
|
});
|
|
48
41
|
return (_ctx, _cache) => {
|
|
49
42
|
return openBlock(), createBlock(unref(NConfigProvider), normalizeProps(guardReactiveProps(__props.configProviderProps)), {
|
|
50
|
-
default: withCtx(() => [
|
|
51
|
-
createVNode(unref(
|
|
43
|
+
default: withCtx(() => [createVNode(unref(NLoadingBarProvider), normalizeProps(guardReactiveProps(__props.loadingBarProps)), {
|
|
44
|
+
default: withCtx(() => [createVNode(unref(LoadingProvider_default), normalizeProps(guardReactiveProps(__props.loadingProviderProps)), {
|
|
52
45
|
default: withCtx(() => [createVNode(unref(NDialogProvider), normalizeProps(guardReactiveProps(__props.dialogProviderProps)), {
|
|
53
46
|
default: withCtx(() => [createVNode(unref(NModalProvider), normalizeProps(guardReactiveProps(__props.modalProviderProps)), {
|
|
54
47
|
default: withCtx(() => [createVNode(unref(NNotificationProvider), normalizeProps(guardReactiveProps(__props.notificationProviderProps)), {
|
|
@@ -63,10 +56,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
63
56
|
_: 3
|
|
64
57
|
}, 16)]),
|
|
65
58
|
_: 3
|
|
66
|
-
}, 16),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
]),
|
|
59
|
+
}, 16)]),
|
|
60
|
+
_: 3
|
|
61
|
+
}, 16), __props.globalStyle ? (openBlock(), createBlock(unref(NGlobalStyle), { key: 0 })) : createCommentVNode("v-if", true)]),
|
|
70
62
|
_: 3
|
|
71
63
|
}, 16);
|
|
72
64
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ClassStyle } from "../data-table-plus/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { LoadingProviderProps } from "../loading-provider/index.js";
|
|
3
3
|
import "../../components.js";
|
|
4
4
|
import * as vue18 from "vue";
|
|
5
5
|
import * as naive_ui3 from "naive-ui";
|
|
6
6
|
|
|
7
7
|
//#region src/components/config-providers/ConfigProviders.vue.d.ts
|
|
8
|
-
declare var
|
|
8
|
+
declare var __VLS_44: {};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
|
-
default?: (props: typeof
|
|
10
|
+
default?: (props: typeof __VLS_44) => any;
|
|
11
11
|
};
|
|
12
12
|
declare const __VLS_base: vue18.DefineComponent<{
|
|
13
13
|
globalStyle?: boolean;
|
|
14
14
|
configProviderProps?: naive_ui3.ConfigProviderProps & ClassStyle;
|
|
15
15
|
loadingBarProps?: naive_ui3.LoadingBarProviderProps & ClassStyle;
|
|
16
|
-
|
|
16
|
+
loadingProviderProps?: LoadingProviderProps & ClassStyle;
|
|
17
17
|
dialogProviderProps?: naive_ui3.DialogProviderProps & ClassStyle;
|
|
18
18
|
modalProviderProps?: naive_ui3.ModalProviderProps & ClassStyle;
|
|
19
19
|
notificationProviderProps?: naive_ui3.NotificationProviderProps & ClassStyle;
|
|
@@ -22,7 +22,7 @@ declare const __VLS_base: vue18.DefineComponent<{
|
|
|
22
22
|
globalStyle?: boolean;
|
|
23
23
|
configProviderProps?: naive_ui3.ConfigProviderProps & ClassStyle;
|
|
24
24
|
loadingBarProps?: naive_ui3.LoadingBarProviderProps & ClassStyle;
|
|
25
|
-
|
|
25
|
+
loadingProviderProps?: LoadingProviderProps & ClassStyle;
|
|
26
26
|
dialogProviderProps?: naive_ui3.DialogProviderProps & ClassStyle;
|
|
27
27
|
modalProviderProps?: naive_ui3.ModalProviderProps & ClassStyle;
|
|
28
28
|
notificationProviderProps?: naive_ui3.NotificationProviderProps & ClassStyle;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { useLoading } from "../../composables/useLoading.js";
|
|
2
|
+
import "../../composables/index.js";
|
|
1
3
|
import { ClassStyle } from "../data-table-plus/index.js";
|
|
2
|
-
import {
|
|
4
|
+
import { LoadingProviderProps } from "../loading-provider/index.js";
|
|
3
5
|
import { _default } from "./ConfigProviders.vue.js";
|
|
4
6
|
import { ConfigProviderProps, DialogProviderInst, DialogProviderProps, LoadingBarProviderInst, LoadingBarProviderProps, MessageProviderInst, MessageProviderProps, ModalProviderInst, ModalProviderProps, NotificationProviderInst, NotificationProviderProps } from "naive-ui";
|
|
5
7
|
|
|
@@ -8,20 +10,16 @@ type ConfigProvidersProps = {
|
|
|
8
10
|
globalStyle?: boolean;
|
|
9
11
|
configProviderProps?: ConfigProviderProps & ClassStyle;
|
|
10
12
|
loadingBarProps?: LoadingBarProviderProps & ClassStyle;
|
|
11
|
-
|
|
13
|
+
loadingProviderProps?: LoadingProviderProps & ClassStyle;
|
|
12
14
|
dialogProviderProps?: DialogProviderProps & ClassStyle;
|
|
13
15
|
modalProviderProps?: ModalProviderProps & ClassStyle;
|
|
14
16
|
notificationProviderProps?: NotificationProviderProps & ClassStyle;
|
|
15
17
|
messageProviderProps?: MessageProviderProps & ClassStyle;
|
|
16
18
|
};
|
|
17
|
-
type LoadingIns = {
|
|
18
|
-
start: () => void;
|
|
19
|
-
finish: () => void;
|
|
20
|
-
};
|
|
21
19
|
declare global {
|
|
22
20
|
interface Window {
|
|
23
21
|
$dialog: DialogProviderInst;
|
|
24
|
-
$loading:
|
|
22
|
+
$loading: ReturnType<typeof useLoading>;
|
|
25
23
|
$loadingBar: LoadingBarProviderInst;
|
|
26
24
|
$message: MessageProviderInst;
|
|
27
25
|
$modal: ModalProviderInst;
|
|
@@ -29,4 +27,4 @@ declare global {
|
|
|
29
27
|
}
|
|
30
28
|
}
|
|
31
29
|
//#endregion
|
|
32
|
-
export { ConfigProvidersProps
|
|
30
|
+
export { ConfigProvidersProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClassStyle } from "../data-table-plus/index.js";
|
|
2
2
|
import "../../components.js";
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
3
|
+
import * as _vueuse_core8 from "@vueuse/core";
|
|
4
|
+
import * as vue35 from "vue";
|
|
5
5
|
import * as naive_ui17 from "naive-ui";
|
|
6
6
|
|
|
7
7
|
//#region src/components/copy-button/CopyButton.vue.d.ts
|
|
@@ -13,21 +13,21 @@ type __VLS_Slots = {} & {
|
|
|
13
13
|
} & {
|
|
14
14
|
tooltip?: (props: typeof __VLS_25) => any;
|
|
15
15
|
};
|
|
16
|
-
declare const __VLS_base:
|
|
16
|
+
declare const __VLS_base: vue35.DefineComponent<{
|
|
17
17
|
value?: string;
|
|
18
|
-
config?:
|
|
18
|
+
config?: _vueuse_core8.UseClipboardOptions<string | undefined>;
|
|
19
19
|
tooltipProps?: naive_ui17.TooltipProps & ClassStyle;
|
|
20
20
|
buttonProps?: naive_ui17.ButtonProps & ClassStyle;
|
|
21
|
-
}, {}, {}, {}, {},
|
|
21
|
+
}, {}, {}, {}, {}, vue35.ComponentOptionsMixin, vue35.ComponentOptionsMixin, {} & {
|
|
22
22
|
copied: (v: string | undefined) => any;
|
|
23
|
-
}, string,
|
|
23
|
+
}, string, vue35.PublicProps, Readonly<{
|
|
24
24
|
value?: string;
|
|
25
|
-
config?:
|
|
25
|
+
config?: _vueuse_core8.UseClipboardOptions<string | undefined>;
|
|
26
26
|
tooltipProps?: naive_ui17.TooltipProps & ClassStyle;
|
|
27
27
|
buttonProps?: naive_ui17.ButtonProps & ClassStyle;
|
|
28
28
|
}> & Readonly<{
|
|
29
29
|
onCopied?: ((v: string | undefined) => any) | undefined;
|
|
30
|
-
}>, {}, {}, {}, {}, string,
|
|
30
|
+
}>, {}, {}, {}, {}, string, vue35.ComponentProvideOptions, false, {}, any>;
|
|
31
31
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
32
|
declare const _default: typeof __VLS_export;
|
|
33
33
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { DataObject } from "../../composables/useDataRequest.js";
|
|
2
2
|
import "../../composables/index.js";
|
|
3
3
|
import { DataTablePlusEmits, DataTablePlusExpose, DataTablePlusProps } from "./index.js";
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
4
|
+
import * as _vueuse_core33 from "@vueuse/core";
|
|
5
|
+
import * as vue69 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: __VLS_PrettifyLocal<DataTablePlusProps<P, D, R> & {
|
|
11
|
-
onSuccess?: ((data: D, params: P[]) => any) | undefined;
|
|
10
|
+
props: vue69.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;
|
|
15
16
|
onBefore?: ((params: P[]) => any) | undefined;
|
|
16
17
|
"onUpdate:page"?: ((page: number) => any) | undefined;
|
|
17
18
|
"onUpdate:pageSize"?: ((pageSize: number) => any) | undefined;
|
|
18
|
-
onFinally?: ((params: P[], data?: D | undefined, err?: Error | undefined) => any) | undefined;
|
|
19
19
|
onClickRow?: ((row: R, index: number, event: MouseEvent, currentData: R[]) => any) | undefined;
|
|
20
20
|
onContextMenuRow?: ((row: R, index: number, event: MouseEvent, currentData: R[]) => any) | undefined;
|
|
21
21
|
onScrollBottom?: ((ev: Event) => any) | undefined;
|
|
@@ -26,10 +26,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
26
26
|
"onUpdate:expandedRowKeys"?: ((keys: (string | number)[], currentData: R[]) => any) | undefined;
|
|
27
27
|
"onUpdate:filters"?: ((filterState: DataTableFilterState, sourceColumn: DataTableBaseColumn) => any) | undefined;
|
|
28
28
|
"onUpdate:sorter"?: ((options: DataTableSortState | DataTableSortState[] | null) => 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: vue69.ShallowUnwrapRef<DataTablePlusExpose<P, D, R>>) => void;
|
|
33
33
|
attrs: any;
|
|
34
34
|
slots: {
|
|
35
35
|
header?: (props: {
|
|
@@ -50,7 +50,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
50
50
|
filters: DataTableFilterState | undefined;
|
|
51
51
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
52
52
|
dataTableRef: DataTableInst | null;
|
|
53
|
-
pagination:
|
|
53
|
+
pagination: vue69.Ref<{
|
|
54
54
|
page: number;
|
|
55
55
|
pageSize: number;
|
|
56
56
|
itemCount: number;
|
|
@@ -72,10 +72,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
72
72
|
setParams: (_params: Partial<P>) => void;
|
|
73
73
|
runParams: (_params: Partial<P>) => void;
|
|
74
74
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
75
|
-
onBefore:
|
|
76
|
-
onSuccess:
|
|
77
|
-
onError:
|
|
78
|
-
onFinally:
|
|
75
|
+
onBefore: _vueuse_core33.EventHookOn<[P[]]>;
|
|
76
|
+
onSuccess: _vueuse_core33.EventHookOn<[D, P[]]>;
|
|
77
|
+
onError: _vueuse_core33.EventHookOn<[Error, P[]]>;
|
|
78
|
+
onFinally: _vueuse_core33.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
79
79
|
}) => any;
|
|
80
80
|
} & {
|
|
81
81
|
title?: (props: {}) => any;
|
|
@@ -98,7 +98,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
98
98
|
filters: DataTableFilterState | undefined;
|
|
99
99
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
100
100
|
dataTableRef: DataTableInst | null;
|
|
101
|
-
pagination:
|
|
101
|
+
pagination: vue69.Ref<{
|
|
102
102
|
page: number;
|
|
103
103
|
pageSize: number;
|
|
104
104
|
itemCount: number;
|
|
@@ -120,10 +120,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
120
120
|
setParams: (_params: Partial<P>) => void;
|
|
121
121
|
runParams: (_params: Partial<P>) => void;
|
|
122
122
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
123
|
-
onBefore:
|
|
124
|
-
onSuccess:
|
|
125
|
-
onError:
|
|
126
|
-
onFinally:
|
|
123
|
+
onBefore: _vueuse_core33.EventHookOn<[P[]]>;
|
|
124
|
+
onSuccess: _vueuse_core33.EventHookOn<[D, P[]]>;
|
|
125
|
+
onError: _vueuse_core33.EventHookOn<[Error, P[]]>;
|
|
126
|
+
onFinally: _vueuse_core33.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
127
127
|
}) => any;
|
|
128
128
|
} & {
|
|
129
129
|
filter?: (props: {
|
|
@@ -144,7 +144,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
144
144
|
filters: DataTableFilterState | undefined;
|
|
145
145
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
146
146
|
dataTableRef: DataTableInst | null;
|
|
147
|
-
pagination:
|
|
147
|
+
pagination: vue69.Ref<{
|
|
148
148
|
page: number;
|
|
149
149
|
pageSize: number;
|
|
150
150
|
itemCount: number;
|
|
@@ -166,10 +166,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
166
166
|
setParams: (_params: Partial<P>) => void;
|
|
167
167
|
runParams: (_params: Partial<P>) => void;
|
|
168
168
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
169
|
-
onBefore:
|
|
170
|
-
onSuccess:
|
|
171
|
-
onError:
|
|
172
|
-
onFinally:
|
|
169
|
+
onBefore: _vueuse_core33.EventHookOn<[P[]]>;
|
|
170
|
+
onSuccess: _vueuse_core33.EventHookOn<[D, P[]]>;
|
|
171
|
+
onError: _vueuse_core33.EventHookOn<[Error, P[]]>;
|
|
172
|
+
onFinally: _vueuse_core33.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
173
173
|
}) => any;
|
|
174
174
|
} & {
|
|
175
175
|
empty?: (props: {
|
|
@@ -190,7 +190,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
190
190
|
filters: DataTableFilterState | undefined;
|
|
191
191
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
192
192
|
dataTableRef: DataTableInst | null;
|
|
193
|
-
pagination:
|
|
193
|
+
pagination: vue69.Ref<{
|
|
194
194
|
page: number;
|
|
195
195
|
pageSize: number;
|
|
196
196
|
itemCount: number;
|
|
@@ -212,10 +212,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
212
212
|
setParams: (_params: Partial<P>) => void;
|
|
213
213
|
runParams: (_params: Partial<P>) => void;
|
|
214
214
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
215
|
-
onBefore:
|
|
216
|
-
onSuccess:
|
|
217
|
-
onError:
|
|
218
|
-
onFinally:
|
|
215
|
+
onBefore: _vueuse_core33.EventHookOn<[P[]]>;
|
|
216
|
+
onSuccess: _vueuse_core33.EventHookOn<[D, P[]]>;
|
|
217
|
+
onError: _vueuse_core33.EventHookOn<[Error, P[]]>;
|
|
218
|
+
onFinally: _vueuse_core33.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
219
219
|
}) => any;
|
|
220
220
|
} & {
|
|
221
221
|
loading?: (props: {
|
|
@@ -236,7 +236,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
236
236
|
filters: DataTableFilterState | undefined;
|
|
237
237
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
238
238
|
dataTableRef: DataTableInst | null;
|
|
239
|
-
pagination:
|
|
239
|
+
pagination: vue69.Ref<{
|
|
240
240
|
page: number;
|
|
241
241
|
pageSize: number;
|
|
242
242
|
itemCount: number;
|
|
@@ -258,10 +258,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
258
258
|
setParams: (_params: Partial<P>) => void;
|
|
259
259
|
runParams: (_params: Partial<P>) => void;
|
|
260
260
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
261
|
-
onBefore:
|
|
262
|
-
onSuccess:
|
|
263
|
-
onError:
|
|
264
|
-
onFinally:
|
|
261
|
+
onBefore: _vueuse_core33.EventHookOn<[P[]]>;
|
|
262
|
+
onSuccess: _vueuse_core33.EventHookOn<[D, P[]]>;
|
|
263
|
+
onError: _vueuse_core33.EventHookOn<[Error, P[]]>;
|
|
264
|
+
onFinally: _vueuse_core33.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
265
265
|
}) => any;
|
|
266
266
|
} & {
|
|
267
267
|
footer?: (props: {
|
|
@@ -282,7 +282,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
282
282
|
filters: DataTableFilterState | undefined;
|
|
283
283
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
284
284
|
dataTableRef: DataTableInst | null;
|
|
285
|
-
pagination:
|
|
285
|
+
pagination: vue69.Ref<{
|
|
286
286
|
page: number;
|
|
287
287
|
pageSize: number;
|
|
288
288
|
itemCount: number;
|
|
@@ -304,10 +304,10 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
304
304
|
setParams: (_params: Partial<P>) => void;
|
|
305
305
|
runParams: (_params: Partial<P>) => void;
|
|
306
306
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
307
|
-
onBefore:
|
|
308
|
-
onSuccess:
|
|
309
|
-
onError:
|
|
310
|
-
onFinally:
|
|
307
|
+
onBefore: _vueuse_core33.EventHookOn<[P[]]>;
|
|
308
|
+
onSuccess: _vueuse_core33.EventHookOn<[D, P[]]>;
|
|
309
|
+
onError: _vueuse_core33.EventHookOn<[Error, P[]]>;
|
|
310
|
+
onFinally: _vueuse_core33.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
311
311
|
}) => any;
|
|
312
312
|
} & {
|
|
313
313
|
'footer-extra'?: (props: {
|
|
@@ -328,7 +328,7 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
328
328
|
filters: DataTableFilterState | undefined;
|
|
329
329
|
sorters: Record<string, DataTableSortState> | undefined;
|
|
330
330
|
dataTableRef: DataTableInst | null;
|
|
331
|
-
pagination:
|
|
331
|
+
pagination: vue69.Ref<{
|
|
332
332
|
page: number;
|
|
333
333
|
pageSize: number;
|
|
334
334
|
itemCount: number;
|
|
@@ -350,14 +350,14 @@ declare const __VLS_export: <P extends DataObject, D extends DataObject, R exten
|
|
|
350
350
|
setParams: (_params: Partial<P>) => void;
|
|
351
351
|
runParams: (_params: Partial<P>) => void;
|
|
352
352
|
runParamsAsync: (_params: Partial<P>) => Promise<D>;
|
|
353
|
-
onBefore:
|
|
354
|
-
onSuccess:
|
|
355
|
-
onError:
|
|
356
|
-
onFinally:
|
|
353
|
+
onBefore: _vueuse_core33.EventHookOn<[P[]]>;
|
|
354
|
+
onSuccess: _vueuse_core33.EventHookOn<[D, P[]]>;
|
|
355
|
+
onError: _vueuse_core33.EventHookOn<[Error, P[]]>;
|
|
356
|
+
onFinally: _vueuse_core33.EventHookOn<[P[], D | undefined, Error | undefined]>;
|
|
357
357
|
}) => any;
|
|
358
358
|
};
|
|
359
359
|
emit: DataTablePlusEmits<P, D, R>;
|
|
360
|
-
}>) =>
|
|
360
|
+
}>) => vue69.VNode & {
|
|
361
361
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
362
362
|
};
|
|
363
363
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,31 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { _default as _default$1 } from "./remote-request/RemoteRequest.vue.js";
|
|
1
|
+
import { NaiveFormRules } from "../composables/useNaiveForm.js";
|
|
2
|
+
import { _default } from "./remote-request/RemoteRequest.vue.js";
|
|
4
3
|
import { RemoteRequestEmits, RemoteRequestExpose, RemoteRequestFields, RemoteRequestInst, RemoteRequestProps } from "./remote-request/index.js";
|
|
5
|
-
import { _default as _default$
|
|
4
|
+
import { _default as _default$1 } from "./search-input/SearchInput.vue.js";
|
|
6
5
|
import { SearchInputProps } from "./search-input/index.js";
|
|
7
|
-
import {
|
|
8
|
-
import { _default as _default$3 } from "./data-table-plus/DataTablePlus.vue.js";
|
|
6
|
+
import { _default as _default$2 } from "./data-table-plus/DataTablePlus.vue.js";
|
|
9
7
|
import { ClassStyle, DataTablePlusEmits, DataTablePlusExpose, DataTablePlusFields, DataTablePlusInst, DataTablePlusProps } from "./data-table-plus/index.js";
|
|
10
|
-
import { _default as _default$
|
|
11
|
-
import {
|
|
12
|
-
import { _default as _default$
|
|
13
|
-
import { ConfigProvidersProps
|
|
14
|
-
import { _default as _default$
|
|
8
|
+
import { _default as _default$3 } from "./loading-provider/LoadingProvider.vue.js";
|
|
9
|
+
import { LoadingProviderProps, loadingProviderInjectionKey } from "./loading-provider/index.js";
|
|
10
|
+
import { _default as _default$4 } from "./config-providers/ConfigProviders.vue.js";
|
|
11
|
+
import { ConfigProvidersProps } from "./config-providers/index.js";
|
|
12
|
+
import { _default as _default$5 } from "./copy-button/CopyButton.vue.js";
|
|
15
13
|
import { CopyButtonProps } from "./copy-button/index.js";
|
|
16
|
-
import { _default as _default$
|
|
14
|
+
import { _default as _default$6 } from "./preset-input/PresetInput.vue.js";
|
|
17
15
|
import { PresetInputOptions, PresetInputProps, PresetInputType } from "./preset-input/index.js";
|
|
18
|
-
import { _default as _default$
|
|
16
|
+
import { _default as _default$7 } from "./preset-form/PresetForm.vue.js";
|
|
19
17
|
import { PresetFormExpose, PresetFormInst, PresetFormOptionItem, PresetFormOptions, PresetFormProps } from "./preset-form/index.js";
|
|
20
|
-
import { _default as _default$
|
|
18
|
+
import { _default as _default$8 } from "./preset-picker/PresetPicker.vue.js";
|
|
21
19
|
import { PresetPickerEmits, PresetPickerExpose, PresetPickerInst, PresetPickerProps, PresetPickerValue } from "./preset-picker/index.js";
|
|
22
|
-
import { _default as _default$
|
|
20
|
+
import { _default as _default$9 } from "./preset-select/PresetSelect.vue.js";
|
|
23
21
|
import { ArrayAwareType, OptionFormat, PresetSelectEmits, PresetSelectExpose, PresetSelectFields, PresetSelectInst, PresetSelectProps, PresetSelectValue } from "./preset-select/index.js";
|
|
24
|
-
import { _default as _default$
|
|
22
|
+
import { _default as _default$10 } from "./toggle-input/ToggleInput.vue.js";
|
|
25
23
|
import "./toggle-input/index.js";
|
|
26
|
-
import { _default as _default$
|
|
24
|
+
import { _default as _default$11 } from "./tooltip-button/TooltipButton.vue.js";
|
|
27
25
|
import { TooltipButtonProps } from "./tooltip-button/index.js";
|
|
28
|
-
import { _default as _default$
|
|
26
|
+
import { _default as _default$12 } from "./transition/BaseTransition.vue.js";
|
|
29
27
|
import { TransitionProps } from "./transition/index.js";
|
|
30
|
-
import { _default as _default$
|
|
28
|
+
import { _default as _default$13 } from "./type-writer/TypeWriter.vue.js";
|
|
31
29
|
import { TypeWriterProps } from "./type-writer/index.js";
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import BaseTransition_default from "../transition/BaseTransition.js";
|
|
2
|
+
import { cName, loadingProviderCssr } from "./loading-provider.cssr.js";
|
|
3
|
+
import { loadingProviderInjectionKey } from "./index.js";
|
|
4
|
+
import { Fragment, Teleport, createBlock, createCommentVNode, createElementBlock, createSlots, createVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, provide, ref, renderSlot, unref, watchEffect, withCtx } from "vue";
|
|
5
|
+
import { useStyle } from "@oiij/css-render";
|
|
6
|
+
import { NEl, NSpin } from "naive-ui";
|
|
7
|
+
|
|
8
|
+
//#region src/components/loading-provider/LoadingProvider.vue
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
+
__name: "LoadingProvider",
|
|
11
|
+
props: {
|
|
12
|
+
show: { type: Boolean },
|
|
13
|
+
appendTo: { default: "body" },
|
|
14
|
+
mask: {
|
|
15
|
+
type: [Boolean, Object],
|
|
16
|
+
default: true
|
|
17
|
+
},
|
|
18
|
+
blur: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: true
|
|
21
|
+
},
|
|
22
|
+
duration: {},
|
|
23
|
+
spinProps: {}
|
|
24
|
+
},
|
|
25
|
+
setup(__props) {
|
|
26
|
+
useStyle(cName, loadingProviderCssr());
|
|
27
|
+
const _show = ref(__props.show);
|
|
28
|
+
watchEffect(() => {
|
|
29
|
+
_show.value = __props.show;
|
|
30
|
+
});
|
|
31
|
+
const textRef = ref("");
|
|
32
|
+
function hideLoading() {
|
|
33
|
+
_show.value = false;
|
|
34
|
+
}
|
|
35
|
+
function showLoading(options) {
|
|
36
|
+
const { text, duration: _duration } = options ?? {};
|
|
37
|
+
textRef.value = text ?? "";
|
|
38
|
+
_show.value = true;
|
|
39
|
+
if (_duration ?? __props.duration) setTimeout(() => {
|
|
40
|
+
_show.value = false;
|
|
41
|
+
}, _duration ?? __props.duration);
|
|
42
|
+
return { hide: hideLoading };
|
|
43
|
+
}
|
|
44
|
+
provide(loadingProviderInjectionKey, {
|
|
45
|
+
show: showLoading,
|
|
46
|
+
hide: hideLoading
|
|
47
|
+
});
|
|
48
|
+
return (_ctx, _cache) => {
|
|
49
|
+
return openBlock(), createElementBlock(Fragment, null, [createVNode(unref(BaseTransition_default), null, {
|
|
50
|
+
default: withCtx(() => [(openBlock(), createBlock(Teleport, { to: __props.appendTo }, [_show.value ? (openBlock(), createBlock(unref(NEl), {
|
|
51
|
+
key: 0,
|
|
52
|
+
class: normalizeClass([
|
|
53
|
+
unref(cName),
|
|
54
|
+
{ [`${unref(cName)}--mask`]: __props.mask },
|
|
55
|
+
{ [`${unref(cName)}--blur`]: __props.blur }
|
|
56
|
+
]),
|
|
57
|
+
style: normalizeStyle(typeof __props.mask === "object" ? __props.mask : {})
|
|
58
|
+
}, {
|
|
59
|
+
default: withCtx(() => [createVNode(unref(NSpin), mergeProps({ description: textRef.value }, __props.spinProps), createSlots({ _: 2 }, [_ctx.$slots.description ? {
|
|
60
|
+
name: "description",
|
|
61
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "description")]),
|
|
62
|
+
key: "0"
|
|
63
|
+
} : void 0, _ctx.$slots.icon ? {
|
|
64
|
+
name: "icon",
|
|
65
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "icon")]),
|
|
66
|
+
key: "1"
|
|
67
|
+
} : void 0]), 1040, ["description"])]),
|
|
68
|
+
_: 3
|
|
69
|
+
}, 8, ["class", "style"])) : createCommentVNode("v-if", true)], 8, ["to"]))]),
|
|
70
|
+
_: 3
|
|
71
|
+
}), renderSlot(_ctx.$slots, "default")], 64);
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
var LoadingProvider_default = _sfc_main;
|
|
76
|
+
|
|
77
|
+
//#endregion
|
|
78
|
+
export { LoadingProvider_default as default };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ClassStyle } from "../data-table-plus/index.js";
|
|
2
|
+
import "../../components.js";
|
|
3
|
+
import * as vue23 from "vue";
|
|
4
|
+
import * as naive_ui15 from "naive-ui";
|
|
5
|
+
|
|
6
|
+
//#region src/components/loading-provider/LoadingProvider.vue.d.ts
|
|
7
|
+
declare var __VLS_26: {}, __VLS_29: {}, __VLS_31: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
description?: (props: typeof __VLS_26) => any;
|
|
10
|
+
} & {
|
|
11
|
+
icon?: (props: typeof __VLS_29) => any;
|
|
12
|
+
} & {
|
|
13
|
+
default?: (props: typeof __VLS_31) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_base: vue23.DefineComponent<{
|
|
16
|
+
show?: boolean;
|
|
17
|
+
appendTo?: string | vue23.RendererElement;
|
|
18
|
+
mask?: boolean | vue23.CSSProperties;
|
|
19
|
+
blur?: boolean;
|
|
20
|
+
duration?: number;
|
|
21
|
+
spinProps?: Omit<naive_ui15.SpinProps, "show"> & ClassStyle;
|
|
22
|
+
}, {}, {}, {}, {}, vue23.ComponentOptionsMixin, vue23.ComponentOptionsMixin, {}, string, vue23.PublicProps, Readonly<{
|
|
23
|
+
show?: boolean;
|
|
24
|
+
appendTo?: string | vue23.RendererElement;
|
|
25
|
+
mask?: boolean | vue23.CSSProperties;
|
|
26
|
+
blur?: boolean;
|
|
27
|
+
duration?: number;
|
|
28
|
+
spinProps?: Omit<naive_ui15.SpinProps, "show"> & ClassStyle;
|
|
29
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, vue23.ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
//#endregion
|
|
38
|
+
export { _default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ClassStyle } from "../data-table-plus/index.js";
|
|
2
|
+
import { _default } from "./LoadingProvider.vue.js";
|
|
3
|
+
import { CSSProperties, InjectionKey, RendererElement } from "vue";
|
|
4
|
+
import { SpinProps } from "naive-ui";
|
|
5
|
+
|
|
6
|
+
//#region src/components/loading-provider/index.d.ts
|
|
7
|
+
declare const loadingProviderInjectionKey: InjectionKey<{
|
|
8
|
+
show: (options?: {
|
|
9
|
+
text?: string;
|
|
10
|
+
duration?: number;
|
|
11
|
+
}) => void;
|
|
12
|
+
hide: () => void;
|
|
13
|
+
}>;
|
|
14
|
+
type LoadingProviderProps = {
|
|
15
|
+
show?: boolean;
|
|
16
|
+
appendTo?: string | RendererElement;
|
|
17
|
+
mask?: boolean | CSSProperties;
|
|
18
|
+
blur?: boolean;
|
|
19
|
+
duration?: number;
|
|
20
|
+
spinProps?: Omit<SpinProps, 'show'> & ClassStyle;
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { LoadingProviderProps, loadingProviderInjectionKey };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { cssr, namespace, plugin } from "../_utils/cssr-bem.js";
|
|
2
2
|
import { cM } from "naive-ui";
|
|
3
3
|
|
|
4
|
-
//#region src/components/
|
|
4
|
+
//#region src/components/loading-provider/loading-provider.cssr.ts
|
|
5
5
|
const { c, cB } = {
|
|
6
6
|
...cssr,
|
|
7
7
|
...plugin
|
|
8
8
|
};
|
|
9
|
-
const cName = `${namespace}-
|
|
10
|
-
function
|
|
11
|
-
return c([cB("
|
|
9
|
+
const cName = `${namespace}-loading-provider`;
|
|
10
|
+
function loadingProviderCssr() {
|
|
11
|
+
return c([cB("loading-provider", {
|
|
12
12
|
position: "fixed",
|
|
13
13
|
inset: 0,
|
|
14
14
|
zIndex: 99,
|
|
@@ -19,4 +19,4 @@ function fullLoadingCssr() {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
//#endregion
|
|
22
|
-
export { cName,
|
|
22
|
+
export { cName, loadingProviderCssr };
|