feat(Toast): add closeOnClick option (#4192)

This commit is contained in:
neverland
2019-08-22 17:57:25 +08:00
committed by GitHub
parent 5603da5c73
commit d2b28432cd
6 changed files with 35 additions and 2 deletions
+7 -1
View File
@@ -17,7 +17,8 @@ const defaultOptions = {
forbidClick: false,
loadingType: undefined,
getContainer: 'body',
overlayStyle: null
overlayStyle: null,
closeOnClick: false
};
let queue = [];
@@ -44,6 +45,11 @@ function createInstance() {
const toast = new (Vue.extend(VueToast))({
el: document.createElement('div')
});
toast.$on('input', value => {
toast.value = value;
});
queue.push(toast);
}