[new feature] Dialog: add getContainer option (#3040)
This commit is contained in:
Vendored
+3
-2
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+6
-5
@@ -13,7 +13,8 @@ export type ToastOptions = {
|
||||
forbidClick?: boolean;
|
||||
loadingType?: string;
|
||||
message?: ToastMessage;
|
||||
}
|
||||
getContainer?: string | (() => HTMLElement);
|
||||
};
|
||||
|
||||
export interface VanToast extends Vue, VanPopupMixin {
|
||||
type: string;
|
||||
@@ -24,7 +25,7 @@ export interface VanToast extends Vue, VanPopupMixin {
|
||||
clear(): void;
|
||||
}
|
||||
|
||||
export interface IToast {
|
||||
export interface Toast {
|
||||
(message: ToastOptions | ToastMessage, options?: ToastOptions): VanToast;
|
||||
loading(options?: ToastOptions | ToastMessage): VanToast;
|
||||
success(options?: ToastOptions | ToastMessage): VanToast;
|
||||
@@ -33,13 +34,13 @@ export interface IToast {
|
||||
install(): void;
|
||||
setDefaultOptions(options: ToastOptions): void;
|
||||
resetDefaultOptions(): void;
|
||||
allowMultiple(allow: boolean): void
|
||||
allowMultiple(allow: boolean): void;
|
||||
}
|
||||
|
||||
declare module 'vue/types/vue' {
|
||||
interface Vue {
|
||||
$toast: IToast
|
||||
$toast: Toast;
|
||||
}
|
||||
}
|
||||
|
||||
export const Toast: IToast;
|
||||
export const Toast: Toast;
|
||||
|
||||
Vendored
+1
-1
@@ -2,7 +2,7 @@ import { DirectiveFunction, PluginFunction } from 'vue';
|
||||
|
||||
export interface Waterfall {
|
||||
(type: string): DirectiveFunction;
|
||||
install: PluginFunction<void>
|
||||
install: PluginFunction<void>;
|
||||
}
|
||||
|
||||
export const Waterfall: Waterfall;
|
||||
|
||||
Reference in New Issue
Block a user