fix(Toast): may lose forbid click when has multiple toasts (#5398)

This commit is contained in:
neverland
2019-12-27 10:57:47 +08:00
committed by GitHub
parent e9a9388202
commit cf43e6ee75
3 changed files with 46 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
import { createNamespace, isDef } from '../utils';
import { PopupMixin } from '../mixins/popup';
import { lockClick } from './lock-click';
import Icon from '../icon';
import Loading from '../loading';
@@ -65,8 +66,7 @@ export default createComponent({
if (this.clickable !== clickable) {
this.clickable = clickable;
const action = clickable ? 'add' : 'remove';
document.body.classList[action]('van-toast--unclickable');
lockClick(clickable);
}
},