first commit
This commit is contained in:
42
uni_modules/tdesign-uniapp/components/dialog/index.d.ts
vendored
Normal file
42
uni_modules/tdesign-uniapp/components/dialog/index.d.ts
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
declare type Context = any;
|
||||
interface DialogAlertOptionsType {
|
||||
context?: Context;
|
||||
selector?: string;
|
||||
title?: string;
|
||||
content?: string;
|
||||
zIndex?: number;
|
||||
asyncClose?: boolean;
|
||||
confirmButtonText?: string;
|
||||
textAlign?: string;
|
||||
cancelBtn?: string | object;
|
||||
confirmBtn?: string | object;
|
||||
showOverlay?: boolean;
|
||||
closeOnOverlayClick?: boolean;
|
||||
preventScrollThrough?: boolean;
|
||||
}
|
||||
interface DialogConfirmOptionsType extends DialogAlertOptionsType {
|
||||
cancelButtonText?: string;
|
||||
}
|
||||
interface Action {
|
||||
content: string;
|
||||
theme?: 'default' | 'primary' | 'danger' | 'light';
|
||||
}
|
||||
interface DialogActionOptionsType {
|
||||
context?: Context;
|
||||
selector?: string;
|
||||
title?: string;
|
||||
content: string;
|
||||
zIndex?: number;
|
||||
asyncClose?: boolean;
|
||||
actions?: Action[];
|
||||
buttonLayout?: 'vertical' | 'horizontal';
|
||||
}
|
||||
declare const Handler: {
|
||||
alert(options: DialogAlertOptionsType): Promise<unknown>;
|
||||
confirm(options: DialogConfirmOptionsType): Promise<unknown>;
|
||||
close(options?: DialogConfirmOptionsType): Promise<void>;
|
||||
action(options: DialogActionOptionsType): Promise<{
|
||||
index: number;
|
||||
}>;
|
||||
};
|
||||
export default Handler;
|
||||
Reference in New Issue
Block a user