feat(Toast): add closeOnClick option (#4192)
This commit is contained in:
+7
-1
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user