diff --git a/src/components/func/confirm.ts b/src/components/func/confirm.ts index 10501b32..fa099085 100644 --- a/src/components/func/confirm.ts +++ b/src/components/func/confirm.ts @@ -13,14 +13,14 @@ const confirmId = "tg-func-confirm"; /** * @description 自定义 confirm 组件 - * @since Beta v0.3.3 + * @since Beta v0.3.4 * @extends ComponentInternalInstance * @property {Function} exposeProxy.displayBox 显示 confirm * @return ConfirmInstance */ interface ConfirmInstance extends ComponentInternalInstance { exposeProxy: { - displayBox: typeof TGApp.Component.Confirm.displayBox; + displayBox: (props: TGApp.Component.Confirm.Params) => Promise; }; } @@ -41,7 +41,7 @@ async function showConfirm(props: TGApp.Component.Confirm.Params): Promise { if (confirmInstance !== undefined) { const boxVue = confirmInstance.component; - return boxVue.exposeProxy.displayBox(props); + return await boxVue.exposeProxy.displayBox(props); } else { confirmInstance = renderBox(props); return await showConfirm(props); diff --git a/src/components/func/snackbar.ts b/src/components/func/snackbar.ts index 161e84d5..3737ecf1 100644 --- a/src/components/func/snackbar.ts +++ b/src/components/func/snackbar.ts @@ -1,7 +1,7 @@ /** * @file component func snackbar.ts * @description 封装 vuetify 的 snackbar 组件,通过函数调用的方式,简化 snackbar 的使用 - * @since Beta v0.3.3 + * @since Beta v0.3.4 */ import type { ComponentInternalInstance, VNode } from "vue"; @@ -20,7 +20,7 @@ const snackbarId = "tg-func-snackbar"; */ interface SnackbarInstance extends ComponentInternalInstance { exposeProxy: { - displayBox: typeof TGApp.Component.Snackbar.displayBox; + displayBox: (props: TGApp.Component.Snackbar.Params) => void; }; } diff --git a/src/types/Component/Confirm.d.ts b/src/types/Component/Confirm.d.ts index b6e5c5ec..3c60e4fd 100644 --- a/src/types/Component/Confirm.d.ts +++ b/src/types/Component/Confirm.d.ts @@ -1,7 +1,7 @@ /** * @file types Component Confirm.d.ts * @description Component Confirm 类型声明文件 - * @since Beta v0.3.3 + * @since Beta v0.3.4 */ declare namespace TGApp.Component.Confirm { @@ -53,13 +53,4 @@ declare namespace TGApp.Component.Confirm { * @return Params */ type Params = ParamsConfirm | ParamsInput; - - /** - * @description Confirm 方法 - displayBox - * @since Beta v0.3.3 - * @function displayBox - * @param {Params} props - * @return string | boolean - */ - function displayBox(props: Params): boolean | string; } diff --git a/src/types/Component/Snackbar.d.ts b/src/types/Component/Snackbar.d.ts index fa90b647..8aae6f93 100644 --- a/src/types/Component/Snackbar.d.ts +++ b/src/types/Component/Snackbar.d.ts @@ -1,7 +1,7 @@ /** * @file types Component Snackbar.d.ts * @description Component Snackbar 类型声明文件 - * @since Beta v0.3.3 + * @since Beta v0.3.4 */ declare namespace TGApp.Component.Snackbar { @@ -20,13 +20,4 @@ declare namespace TGApp.Component.Snackbar { color?: string; timeout?: number; } - - /** - * @description Snackbar 方法 - displayBox - * @since Beta v0.3.3 - * @function displayBox - * @param {Params} props - * @return void - */ - function displayBox(props: Params): void; }