统一模型库确认框调用方式

This commit is contained in:
zhangshun
2026-06-01 09:40:36 +08:00
parent 738476c7f9
commit 3dfed3a2df
2 changed files with 44 additions and 8 deletions

View File

@@ -28,6 +28,29 @@ type W2Utils = {
title?: string;
text?: string;
}): unknown;
confirm(options: {
box?: string | HTMLElement;
title?: string;
text?: string;
btn_yes?: {
text?: string;
class?: string;
style?: string;
attrs?: string;
};
btn_no?: {
text?: string;
class?: string;
style?: string;
attrs?: string;
};
}): W2ConfirmPromise;
};
type W2ConfirmPromise = {
yes(callback: (event: unknown) => void): W2ConfirmPromise;
no(callback: (event: unknown) => void): W2ConfirmPromise;
close(callback: (event: unknown) => void): W2ConfirmPromise;
};
type W2LayoutOptions = {