[new feature] Dialog: add getContainer option (#3040)

This commit is contained in:
neverland
2019-03-22 15:13:30 +08:00
committed by GitHub
parent 5a44d204bd
commit c1adaebaa6
9 changed files with 25 additions and 22 deletions

5
types/dialog.d.ts vendored
View File

@@ -13,8 +13,9 @@ export type DialogOptions = {
showConfirmButton?: boolean;
showCancelButton?: boolean;
closeOnClickOverlay?: boolean;
getContainer?: string | (() => HTMLElement);
beforeClose?: (action: DialogAction, done: DialogDone) => void;
}
};
export interface Dialog {
(options: DialogOptions): Promise<DialogAction>;
@@ -28,7 +29,7 @@ export interface Dialog {
declare module 'vue/types/vue' {
interface Vue {
$dialog: Dialog
$dialog: Dialog;
}
}