@ciwergrp/nuxid 1.2.0 → 1.2.2
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
|
@@ -466,7 +466,7 @@ function registerFetcherFeature(options, { from }) {
|
|
|
466
466
|
if (!options.enabled) {
|
|
467
467
|
return;
|
|
468
468
|
}
|
|
469
|
-
addImports({ name: "
|
|
469
|
+
addImports({ name: "useCursorHttp", as: "useCursorHttp", from });
|
|
470
470
|
addImports({ name: "APIResponseCursor", as: "APIResponseCursor", from, type: true });
|
|
471
471
|
addImports({ name: "CursorFetchOptions", as: "CursorFetchOptions", from, type: true });
|
|
472
472
|
}
|
|
@@ -20,7 +20,7 @@ export interface CursorFetchOptions<TRequest extends NitroFetchRequest = NitroFe
|
|
|
20
20
|
itemKey?: string;
|
|
21
21
|
cursorParam?: string;
|
|
22
22
|
}
|
|
23
|
-
export declare function
|
|
23
|
+
export declare function useCursorHttp<T extends Record<string, any> = any, TResponse extends APIResponseCursor<T> = APIResponseCursor<T>, TRequest extends NitroFetchRequest = NitroFetchRequest>(url: TRequest, options?: CursorFetchOptions<TRequest>): {
|
|
24
24
|
data: import("vue").Ref<TResponse | undefined, TResponse | undefined>;
|
|
25
25
|
loading: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
26
26
|
error: Readonly<import("vue").Ref<Error | null, Error | null>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isRef, onUnmounted, readonly, ref, shallowRef, watch } from "vue";
|
|
2
|
-
export function
|
|
2
|
+
export function useCursorHttp(url, options) {
|
|
3
3
|
function findReactiveSources(obj) {
|
|
4
4
|
const sources = [];
|
|
5
5
|
if (!obj || typeof obj !== "object") {
|