mirror of
https://github.com/youzan/vant.git
synced 2025-12-24 02:02:09 +08:00
[Improvement] add type definition files (#361)
This commit is contained in:
20
types/dialog.d.ts
vendored
Normal file
20
types/dialog.d.ts
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
export type DialogOptions = {
|
||||
title?: string;
|
||||
message?: string;
|
||||
overlay?: boolean;
|
||||
lockOnScroll?: boolean;
|
||||
confirmButtonText?: string;
|
||||
cancelButtonText?: string;
|
||||
showConfirmButton?: boolean;
|
||||
showCancelButton?: boolean;
|
||||
closeOnClickOverlay?: boolean;
|
||||
}
|
||||
|
||||
export interface Dialog {
|
||||
(options: DialogOptions): Promise<any>;
|
||||
alert(options: DialogOptions): Promise<any>;
|
||||
confirm(options: DialogOptions): Promise<any>;
|
||||
close(): void;
|
||||
}
|
||||
|
||||
export const Dialog: Dialog;
|
||||
Reference in New Issue
Block a user