update Modal

update Modal
This commit is contained in:
梁灏 2017-02-22 14:39:54 +08:00
parent cfb4aad426
commit 48dd8ebf00

View file

@ -132,7 +132,8 @@
},
handleWrapClick (event) {
// use indexOf,do not use === ,because ivu-modal-wrap can have other custom className
if (event.target.getAttribute('class').indexOf(`${prefixCls}-wrap`) > -1) this.mask();
const className = event.target.getAttribute('class');
if (className && className.indexOf(`${prefixCls}-wrap`) > -1) this.mask();
},
cancel () {
this.close();