[improvement] check event.cancelable before preventDefault

This commit is contained in:
陈嘉涵
2019-05-10 14:18:46 +08:00
parent 2fb4bd3090
commit 4119b5b3c7
15 changed files with 43 additions and 33 deletions

View File

@@ -1,4 +1,5 @@
import { use } from '../utils';
import { preventDefault } from '../utils/event';
const [sfc, bem] = use('key');
@@ -29,8 +30,7 @@ export default sfc({
},
onBlur(event) {
event.preventDefault();
event.stopPropagation();
preventDefault(event, true);
this.active = false;
}
},