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

4
types/toast.d.ts vendored
View File

@@ -1,3 +1,5 @@
import { TeleportProps } from 'vue';
type ToastMessage = string | number;
type ToastType = 'text' | 'loading' | 'success' | 'fail' | 'html';
type ToastPosition = 'top' | 'middle' | 'bottom';
@@ -12,6 +14,7 @@ export type ToastOptions = {
onOpened?: () => void;
overlay?: boolean;
duration?: number;
teleport?: TeleportProps['to'];
position?: ToastPosition;
className?: any;
transition?: string;
@@ -20,7 +23,6 @@ export type ToastOptions = {
forbidClick?: boolean;
closeOnClick?: boolean;
closeOnClickOverlay?: boolean;
getContainer?: string | (() => Element);
};
export interface VanToast {