types: fix teleport typing #7687

This commit is contained in:
chenjiahan
2020-12-04 13:50:38 +08:00
parent 9eda920504
commit 52384aba1e
3 changed files with 7 additions and 3 deletions

3
types/dialog.d.ts vendored
View File

@@ -1,4 +1,5 @@
import { VanComponent } from './component';
import { TeleportProps } from 'vue';
type DialogAction = 'confirm' | 'cancel';
type DialogDone = (close?: boolean) => void;
@@ -9,6 +10,7 @@ export type DialogOptions = {
message?: string;
theme?: string;
overlay?: boolean;
teleport?: TeleportProps['to'];
className?: any;
allowHtml?: boolean;
lockScroll?: boolean;
@@ -24,7 +26,6 @@ export type DialogOptions = {
showConfirmButton?: boolean;
showCancelButton?: boolean;
closeOnClickOverlay?: boolean;
getContainer?: string | (() => Element);
beforeClose?: (action: DialogAction, done: DialogDone) => void;
};