Skip to content

Commit 9489e42

Browse files
committed
feat: util
1 parent fe16fc1 commit 9489e42

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

zova-dev/packages-zova/core/src/bean/beanContainer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ export class BeanContainer {
8585

8686
runWithInstanceScopeOrAppContext(fn, tracking?: boolean) {
8787
if (this.ctx) {
88-
return this.ctx.meta.util.instanceScope(fn, tracking);
88+
return this.ctx.util.instanceScope(fn, tracking);
8989
} else {
9090
return this.app.vue.runWithContext(fn);
9191
}
9292
}
9393

9494
provide<K extends keyof IInjectRecord>(injectKey: K, value: IInjectRecord[K]) {
95-
return this.ctx.meta.util.instanceScope(() => {
95+
return this.ctx.util.instanceScope(() => {
9696
return composableProvide(injectKey, value as any);
9797
});
9898
}
@@ -109,7 +109,7 @@ export class BeanContainer {
109109
treatDefaultAsFactory?: true,
110110
): IInjectRecord[K];
111111
inject(injectKey, defaultValue?, treatDefaultAsFactory?) {
112-
return this.ctx.meta.util.instanceScope(() => {
112+
return this.ctx.util.instanceScope(() => {
113113
return composableInject(injectKey, defaultValue, treatDefaultAsFactory);
114114
});
115115
}

zova-dev/packages-zova/core/src/composables/onControllerMounted.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ export async function onControllerMounted(fn) {
77
}
88
await ctx.meta.state.mounted.wait();
99
if (fn) {
10-
return await ctx.meta.util.instanceScope(fn);
10+
return await ctx.util.instanceScope(fn);
1111
}
1212
}

zova-dev/packages-zova/core/src/composables/useController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ async function _useController(
126126
// must touch inited on server/client, force router.use effect
127127
ctx.meta.state.inited.touch();
128128
if (process.env.CLIENT) {
129-
ctx.meta.util.instanceScope(() => {
129+
ctx.util.instanceScope(() => {
130130
queuePostFlushCb(() => {
131131
ctx.meta.state.mounted.touch();
132132
setControllerRef(ctx, true);

zova-dev/packages-zova/core/src/core/context/component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class CtxComponent extends BeanSimple {
2121
return self._bean_render_original.call(this, ...args);
2222
// throw new Error('render bean not found');
2323
}
24-
// need not use ctx.meta.util.instanceScope, since ctx.instance = getCurrentInstance()
24+
// need not use ctx.util.instanceScope, since ctx.instance = getCurrentInstance()
2525
return render.render();
2626
};
2727
instance.type.ssrRender = null;

zova-dev/packages-zova/core/src/core/context/ssr.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export class CtxSSR extends BeanSimple {
8888
get context() {
8989
if (process.env.CLIENT) throw new Error('cannot called in client');
9090
if (!this[SymbolSSRContext]) {
91-
this.ctx.meta.util.instanceScope(() => {
91+
this.ctx.util.instanceScope(() => {
9292
this[SymbolSSRContext] = useSSRContext()!;
9393
this._initContext();
9494
});

zova-dev/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.model/bean.model.useMutation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class BeanModelUseMutation<TScopeModule = unknown> extends BeanModelUseQu
2121
mutationOptions: MaybeRefDeep<MutationObserverOptions<TData, DefaultError, TVariables, TContext>>,
2222
queryClient?: QueryClient,
2323
): UnwrapNestedRefs<UseMutationReturnType<TData, DefaultError, TVariables, TContext>> {
24-
return this.ctx.meta.util.instanceScope(() => {
24+
return this.ctx.util.instanceScope(() => {
2525
return useMutation(mutationOptions, queryClient) as any;
2626
});
2727
}

zova-dev/src/suite-vendor/a-zova/modules/a-model/src/bean/bean.model/bean.model.useQuery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export class BeanModelUseQuery<TScopeModule = unknown> extends BeanModelQuery<TS
4949
return resolveStaleTime(staleTime, query);
5050
};
5151
}
52-
return this.ctx.meta.util.instanceScope(() => {
52+
return this.ctx.util.instanceScope(() => {
5353
return useQuery(options, queryClient);
5454
});
5555
}

0 commit comments

Comments
 (0)