@anweb/nuxt-ancore 1.15.8 → 1.15.9
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
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineNuxtModule, createResolver, addComponentsDir, addImportsDir, addPlugin } from '@nuxt/kit';
|
|
2
2
|
import { pathToFileURL } from 'node:url';
|
|
3
3
|
|
|
4
|
-
const module = defineNuxtModule({
|
|
4
|
+
const module$1 = defineNuxtModule({
|
|
5
5
|
meta: {
|
|
6
6
|
name: "AnCore",
|
|
7
7
|
configKey: "ancore"
|
|
@@ -34,4 +34,4 @@ const module = defineNuxtModule({
|
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
export { module as default };
|
|
37
|
+
export { module$1 as default };
|
|
@@ -4,17 +4,18 @@ import { type AsyncDataRequestStatus } from '#app';
|
|
|
4
4
|
interface TConfig {
|
|
5
5
|
request: NitroFetchRequest;
|
|
6
6
|
apiConfig?: NitroFetchOptions<string>;
|
|
7
|
-
params
|
|
7
|
+
params: Record<string, unknown>;
|
|
8
8
|
}
|
|
9
9
|
interface TUseAnData<TData, TError> {
|
|
10
10
|
init: () => Promise<void>;
|
|
11
11
|
set: (data: TData) => void;
|
|
12
12
|
refresh: () => void;
|
|
13
13
|
config: Ref<TConfig>;
|
|
14
|
+
params: TConfig['params'];
|
|
14
15
|
data: ComputedRef<TData | undefined>;
|
|
15
16
|
status: ComputedRef<AsyncDataRequestStatus>;
|
|
16
17
|
loading: ComputedRef<boolean>;
|
|
17
18
|
error: ComputedRef<TError | undefined>;
|
|
18
19
|
}
|
|
19
|
-
export declare const useAnData: <TData = unknown, TError = unknown>(initConfig: TConfig) => TUseAnData<TData, TError>;
|
|
20
|
+
export declare const useAnData: <TData = unknown, TError = unknown>(initConfig: Omit<TConfig, "params"> & Partial<TConfig["params"]>) => TUseAnData<TData, TError>;
|
|
20
21
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { computed, ref, watch, onMounted, nextTick } from "vue";
|
|
2
2
|
import { useAsyncData } from "#app";
|
|
3
|
-
import { toQuery, userApi } from "
|
|
3
|
+
import { toQuery, userApi } from "#imports";
|
|
4
4
|
export const useAnData = (initConfig) => {
|
|
5
|
-
const config = ref({ ...initConfig });
|
|
5
|
+
const config = ref({ params: {}, ...initConfig });
|
|
6
6
|
const data = ref(void 0);
|
|
7
7
|
const error = ref(void 0);
|
|
8
8
|
const status = ref("idle");
|
|
@@ -69,6 +69,7 @@ export const useAnData = (initConfig) => {
|
|
|
69
69
|
refresh: () => time.value = Date.now(),
|
|
70
70
|
data,
|
|
71
71
|
config,
|
|
72
|
+
params: config.value.params,
|
|
72
73
|
status,
|
|
73
74
|
loading,
|
|
74
75
|
error
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, reactive, watch, computed } from "vue";
|
|
2
2
|
import { useInfiniteScroll } from "@vueuse/core";
|
|
3
|
-
import { useAnData } from "
|
|
3
|
+
import { useAnData } from "#imports";
|
|
4
4
|
export const useAnList = (initConfig) => {
|
|
5
5
|
const config = ref(initConfig);
|
|
6
6
|
const items = reactive([]);
|
|
@@ -14,7 +14,7 @@ declare module 'nuxt/schema' {
|
|
|
14
14
|
interface PublicRuntimeConfig {
|
|
15
15
|
i18n?: InitOptions<unknown> & {
|
|
16
16
|
cookie?: string
|
|
17
|
-
resources?: Record<string, { translation:
|
|
17
|
+
resources?: Record<string, { translation: string }>
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anweb/nuxt-ancore",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.9",
|
|
4
4
|
"description": "AnCore Nuxt module",
|
|
5
5
|
"repository": "https://github.com/ANLTD/ancore",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,20 +32,20 @@
|
|
|
32
32
|
"release:major": "npm run prepack && changelogen --major --release && npm publish --access public && git push --follow-tags"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@
|
|
36
|
-
"@vueuse/
|
|
37
|
-
"@vueuse/integrations": "^14.1.0",
|
|
35
|
+
"@vueuse/core": "^14.2.0",
|
|
36
|
+
"@vueuse/integrations": "^14.2.0",
|
|
38
37
|
"async-validator": "^4.2.5",
|
|
39
|
-
"i18next": "^25.
|
|
38
|
+
"i18next": "^25.8.0",
|
|
40
39
|
"uuid": "^13.0.0"
|
|
41
40
|
},
|
|
42
41
|
"devDependencies": {
|
|
43
42
|
"@nuxt/devtools": "^3.1.1",
|
|
43
|
+
"@nuxt/kit": "^4.3.0",
|
|
44
44
|
"@nuxt/module-builder": "^1.0.2",
|
|
45
|
-
"@nuxt/schema": "^4.
|
|
45
|
+
"@nuxt/schema": "^4.3.0",
|
|
46
46
|
"@types/node": "latest",
|
|
47
47
|
"changelogen": "^0.6.2",
|
|
48
|
-
"nuxt": "^4.
|
|
48
|
+
"nuxt": "^4.3.0",
|
|
49
49
|
"typescript": "~5.9.3"
|
|
50
50
|
}
|
|
51
51
|
}
|