[Improment] add $toast/$dialog to Vue.prototype (#363)

This commit is contained in:
neverland
2017-11-30 14:52:19 +08:00
committed by GitHub
parent 121e2de375
commit c23762e08b
13 changed files with 153 additions and 86 deletions

6
types/dialog.d.ts vendored
View File

@@ -17,4 +17,10 @@ export interface Dialog {
close(): void;
}
declare module 'vue/types/vue' {
interface Vue {
$dialog: Dialog
}
}
export const Dialog: Dialog;

6
types/toast.d.ts vendored
View File

@@ -15,4 +15,10 @@ export interface Toast {
clear(): void;
}
declare module 'vue/types/vue' {
interface Vue {
$toast: Toast
}
}
export const Toast: Toast;