@merkaly/nuxt 0.13.3 → 0.13.4
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/module.json +1 -1
- package/dist/runtime/components/input/InputDropzone.d.vue.ts +1 -1
- package/dist/runtime/components/input/InputDropzone.vue.d.ts +1 -1
- package/dist/runtime/components/input/InputSearch.d.vue.ts +2 -2
- package/dist/runtime/components/input/InputSearch.vue.d.ts +2 -2
- package/dist/runtime/composables/useApi.js +4 -5
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -101,10 +101,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
101
101
|
}>, {
|
|
102
102
|
title: string;
|
|
103
103
|
disabled: boolean;
|
|
104
|
+
multiple: boolean;
|
|
104
105
|
accept: string[];
|
|
105
106
|
hint: string;
|
|
106
107
|
maxSize: number;
|
|
107
|
-
multiple: boolean;
|
|
108
108
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
109
109
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
110
110
|
declare const _default: typeof __VLS_export;
|
|
@@ -101,10 +101,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
101
101
|
}>, {
|
|
102
102
|
title: string;
|
|
103
103
|
disabled: boolean;
|
|
104
|
+
multiple: boolean;
|
|
104
105
|
accept: string[];
|
|
105
106
|
hint: string;
|
|
106
107
|
maxSize: number;
|
|
107
|
-
multiple: boolean;
|
|
108
108
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
109
109
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
110
110
|
declare const _default: typeof __VLS_export;
|
|
@@ -7,8 +7,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
7
7
|
type: import("vue").PropType<string>;
|
|
8
8
|
};
|
|
9
9
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
-
"update:modelValue": (value: string) => any;
|
|
11
10
|
change: () => any;
|
|
11
|
+
"update:modelValue": (value: string) => any;
|
|
12
12
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
13
|
debounce: {
|
|
14
14
|
type: NumberConstructor;
|
|
@@ -18,8 +18,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
18
18
|
type: import("vue").PropType<string>;
|
|
19
19
|
};
|
|
20
20
|
}>> & Readonly<{
|
|
21
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
22
21
|
onChange?: (() => any) | undefined;
|
|
22
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
23
23
|
}>, {
|
|
24
24
|
debounce: number;
|
|
25
25
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -7,8 +7,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
7
7
|
type: import("vue").PropType<string>;
|
|
8
8
|
};
|
|
9
9
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
-
"update:modelValue": (value: string) => any;
|
|
11
10
|
change: () => any;
|
|
11
|
+
"update:modelValue": (value: string) => any;
|
|
12
12
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
13
|
debounce: {
|
|
14
14
|
type: NumberConstructor;
|
|
@@ -18,8 +18,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
18
18
|
type: import("vue").PropType<string>;
|
|
19
19
|
};
|
|
20
20
|
}>> & Readonly<{
|
|
21
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
22
21
|
onChange?: (() => any) | undefined;
|
|
22
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
23
23
|
}>, {
|
|
24
24
|
debounce: number;
|
|
25
25
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getCurrentInstance, onServerPrefetch, reactive, ref, useNuxtApp, useState } from "#imports";
|
|
2
2
|
function useApi(callback) {
|
|
3
3
|
const { $api } = useNuxtApp();
|
|
4
|
-
|
|
4
|
+
let controller = new AbortController();
|
|
5
5
|
const params = reactive({});
|
|
6
6
|
const getOptions = (currentParams) => {
|
|
7
7
|
const options = callback(currentParams);
|
|
@@ -23,6 +23,8 @@ function useApi(callback) {
|
|
|
23
23
|
params[key2] = args[key2];
|
|
24
24
|
});
|
|
25
25
|
const currentOptions = getOptions(params);
|
|
26
|
+
controller = new AbortController();
|
|
27
|
+
loading.value = true;
|
|
26
28
|
await $api(currentOptions.uri, {
|
|
27
29
|
...currentOptions,
|
|
28
30
|
controller,
|
|
@@ -32,10 +34,7 @@ function useApi(callback) {
|
|
|
32
34
|
loading,
|
|
33
35
|
meta,
|
|
34
36
|
params
|
|
35
|
-
}).
|
|
36
|
-
loading.value = false;
|
|
37
|
-
throw reason;
|
|
38
|
-
});
|
|
37
|
+
}).finally(() => loading.value = false);
|
|
39
38
|
};
|
|
40
39
|
if (initialOptions.immediate) {
|
|
41
40
|
const instance = getCurrentInstance();
|