@ginjou/nuxt 0.1.0-beta.10 → 0.1.0-beta.11
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.cjs
CHANGED
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { BaseRecord, Params } from '@ginjou/core';
|
|
2
|
-
import type {
|
|
2
|
+
import type { UseEditContext, UseEditProps, UseEditResult } from '@ginjou/vue';
|
|
3
3
|
import type { AsyncResult } from '../utils/async.js';
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function useAsyncEdit<TQueryData extends BaseRecord = BaseRecord, TMutationParams extends Params = Params, TQueryError = unknown, TQueryResultData extends BaseRecord = TQueryData, TMutationData extends BaseRecord = TQueryResultData, TMutationError = unknown>(props?: UseEditProps<TQueryData, TMutationParams, TQueryError, TQueryResultData, TMutationData, TMutationError>, context?: UseEditContext): AsyncResult<UseEditResult<TMutationParams, TQueryError, TQueryResultData, TMutationData, TMutationError>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEdit } from "@ginjou/vue";
|
|
2
2
|
import { withAsync } from "../utils/async.js";
|
|
3
|
-
export function
|
|
4
|
-
const result =
|
|
3
|
+
export function useAsyncEdit(props, context) {
|
|
4
|
+
const result = useEdit(props, context);
|
|
5
5
|
return withAsync(result, async () => {
|
|
6
6
|
await result.query.suspense();
|
|
7
7
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ginjou/nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.0-beta.
|
|
4
|
+
"version": "0.1.0-beta.11",
|
|
5
5
|
"author": "zhong666 <hi@zhong666.me>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/aa900031/ginjou#readme",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@nuxt/kit": "^3.20.1",
|
|
41
|
-
"@ginjou/vue": "^0.1.0-beta.
|
|
42
|
-
"@ginjou/
|
|
41
|
+
"@ginjou/with-vue-router": "^0.1.0-beta.6",
|
|
42
|
+
"@ginjou/vue": "^0.1.0-beta.14"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@nuxt/module-builder": "^1.0.2",
|