This commit is contained in:
Aresn 2017-06-07 16:31:57 +08:00
parent f1f0206c70
commit b8adf5cf2d
5 changed files with 20281 additions and 33 deletions

View file

@ -198,12 +198,14 @@
}
// if trigger and children is input or textarea,listen focus & blur event
if (this.trigger === 'focus') {
const $children = this.getInputChildren();
if ($children) {
$children.addEventListener('focus', this.handleFocus, false);
$children.addEventListener('blur', this.handleBlur, false);
this.isInput = true;
}
this.isInput = true;
this.$nextTick(() => {
const $children = this.getInputChildren();
if ($children) {
$children.addEventListener('focus', this.handleFocus, false);
$children.addEventListener('blur', this.handleBlur, false);
}
});
}
},
beforeDestroy () {