@anweb/nuxt-ancore 1.10.3 → 1.10.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "AnCore",
3
3
  "configKey": "ancore",
4
- "version": "1.10.3",
4
+ "version": "1.10.4",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -7,14 +7,15 @@ export const useAnData = (initConfig) => {
7
7
  const error = ref(void 0);
8
8
  const status = ref("idle");
9
9
  const init = async () => {
10
- const Data = await useAsyncData(
10
+ const Data = useAsyncData(
11
11
  key,
12
12
  () => userApi(
13
13
  key.value,
14
14
  { method: "GET", ...config.value.apiConfig || {} }
15
15
  ),
16
- { immediate: true }
16
+ { immediate: false }
17
17
  );
18
+ await Data.execute();
18
19
  watch(Data.data, () => data.value = Data.data.value, { immediate: true });
19
20
  watch(Data.error, () => error.value = Data.error.value, { immediate: true });
20
21
  watch(Data.status, () => error.value = Data.status.value, { immediate: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anweb/nuxt-ancore",
3
- "version": "1.10.3",
3
+ "version": "1.10.4",
4
4
  "description": "AnCore Nuxt module",
5
5
  "repository": "https://github.com/ANLTD/ancore",
6
6
  "license": "MIT",