@anweb/nuxt-ancore 1.15.7 → 1.15.8
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
|
@@ -64,9 +64,11 @@ export const useAnForm = (params, data) => {
|
|
|
64
64
|
}
|
|
65
65
|
return changed;
|
|
66
66
|
});
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
Object.keys(state.value).forEach((key) => {
|
|
68
|
+
watch(() => state.value[key], () => {
|
|
69
|
+
errors.value[key] = void 0;
|
|
70
|
+
});
|
|
71
|
+
});
|
|
70
72
|
init();
|
|
71
73
|
return {
|
|
72
74
|
state,
|
|
@@ -4,7 +4,7 @@ interface TConfig<TFilter> {
|
|
|
4
4
|
request: NitroFetchRequest;
|
|
5
5
|
apiConfig?: NitroFetchOptions<string>;
|
|
6
6
|
filter?: TFilter;
|
|
7
|
-
params?: Record<string,
|
|
7
|
+
params?: Record<string, string>;
|
|
8
8
|
skipField?: string;
|
|
9
9
|
reverse?: boolean;
|
|
10
10
|
}
|
|
@@ -12,7 +12,7 @@ export declare const useAnList: <TData, TFilter extends object = {}>(initConfig:
|
|
|
12
12
|
init: () => Promise<void>;
|
|
13
13
|
infiniteScroll: (scrollConfig?: TInfiniteScroll) => () => void;
|
|
14
14
|
filter: TFilter;
|
|
15
|
-
params: Record<string,
|
|
15
|
+
params: Record<string, string> | undefined;
|
|
16
16
|
items: TData[];
|
|
17
17
|
count: import("vue").Ref<number | null, number | null>;
|
|
18
18
|
inited: import("vue").ComputedRef<boolean>;
|
|
@@ -5,7 +5,6 @@ export const useAnList = (initConfig) => {
|
|
|
5
5
|
const config = ref(initConfig);
|
|
6
6
|
const items = reactive([]);
|
|
7
7
|
const count = ref(null);
|
|
8
|
-
let resetInfiniteScroll;
|
|
9
8
|
const init = async () => {
|
|
10
9
|
await data.init();
|
|
11
10
|
await refresh();
|
|
@@ -43,7 +42,6 @@ export const useAnList = (initConfig) => {
|
|
|
43
42
|
canLoadMore
|
|
44
43
|
}
|
|
45
44
|
);
|
|
46
|
-
resetInfiniteScroll = reset;
|
|
47
45
|
return reset;
|
|
48
46
|
};
|
|
49
47
|
const inited = computed(() => data.status.value !== "idle");
|