fix(Toast): closeOnClickOverlay not work (#8044)

* fix(Toast): closeOnClickOverlay not work

* fix: demo
This commit is contained in:
neverland
2021-01-31 16:11:49 +08:00
committed by GitHub
parent 6a3d716f6e
commit 0f3610bafe
3 changed files with 31 additions and 17 deletions
-17
View File
@@ -166,23 +166,6 @@ test('should trigger onClose callback after closed', () => {
Toast.allowMultiple(false);
});
test('closeOnClick option', async () => {
Toast.allowMultiple();
const toast = Toast({
message: 'toast',
});
await later();
toast.$el.click();
expect(toast.value).toBeTruthy();
toast.closeOnClick = true;
toast.$el.click();
expect(toast.value).toBeFalsy();
Toast.allowMultiple(false);
});
test('register component', () => {
Vue.use(Toast);
expect(Vue.component(ToastVue.name)).toBeTruthy();