x-essential-lib 0.10.41 → 0.10.43
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/index.d.ts +1 -1
- package/dist/index.js +3 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -168,7 +168,7 @@ export declare function useSystem(): {
|
|
|
168
168
|
};
|
|
169
169
|
//#endregion
|
|
170
170
|
//#region src/composables/viewStack.d.ts
|
|
171
|
-
export declare function useViewStack(name: string, openHook?: (params: any) =>
|
|
171
|
+
export declare function useViewStack(name: string, openHook?: (params: any) => void, closeHook?: () => Promise<void>): {
|
|
172
172
|
open: import("vue").Ref<boolean, boolean>;
|
|
173
173
|
};
|
|
174
174
|
//#endregion
|
package/dist/index.js
CHANGED
|
@@ -781,11 +781,8 @@ function useViewStack(name, openHook, closeHook) {
|
|
|
781
781
|
}
|
|
782
782
|
});
|
|
783
783
|
async function onOpen(params) {
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
} finally {
|
|
787
|
-
open.value = true;
|
|
788
|
-
}
|
|
784
|
+
openHook?.(params);
|
|
785
|
+
open.value = true;
|
|
789
786
|
}
|
|
790
787
|
onMounted(() => {
|
|
791
788
|
eventBus.on(name, onOpen);
|
|
@@ -797,7 +794,7 @@ function useViewStack(name, openHook, closeHook) {
|
|
|
797
794
|
view.value = val;
|
|
798
795
|
});
|
|
799
796
|
watch(view, async (val) => {
|
|
800
|
-
if (!val) closeHook?.();
|
|
797
|
+
if (!val) await closeHook?.();
|
|
801
798
|
open.value = val;
|
|
802
799
|
});
|
|
803
800
|
return { open };
|