Skip to content

Commit

Permalink
fix: 修复函数式弹窗点击取消按钮,延时关闭无效问题 (#1112)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ten-K authored Apr 26, 2024
1 parent d6f487a commit 2f9bc7e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/ReDialog/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ const addDialog = (options: DialogOptions) => {
const closeDialog = (options: DialogOptions, index: number, args?: any) => {
dialogStore.value[index].visible = false;
options.closeCallBack && options.closeCallBack({ options, index, args });

const closeDelay = options?.closeDelay ?? 200;
useTimeoutFn(() => {
dialogStore.value.splice(index, 1);
}, 200);
}, closeDelay);
};

/**
Expand Down

0 comments on commit 2f9bc7e

Please sign in to comment.