Merge pull request #336 from baiyaaaaa/fix-autocomplete

fix autocomplete event bug
pull/341/head
杨奕 2016-10-11 19:34:42 +08:00 committed by GitHub
commit 5e450548aa
2 changed files with 5 additions and 4 deletions

View File

@ -5,8 +5,8 @@
:disabled="disabled"
:placeholder="placeholder"
:name='name'
@onchange="handleChange"
@onfocus="handleFocus"
@change="handleChange"
@focus="handleFocus"
@keydown.up.native="highlight(highlightedIndex - 1)"
@keydown.down.native="highlight(highlightedIndex + 1)"
@keydown.enter.native="select(highlightedIndex)"

View File

@ -25,7 +25,7 @@
:minlength="minlength"
:autocomplete="autoComplete"
ref="input"
@focus="$emit('onfocus', currentValue)"
@focus="$emit('focus', currentValue)"
@blur="handleBlur"
>
<!-- input 图标 -->
@ -49,7 +49,7 @@
:rows="rows"
:maxlength="maxlength"
:minlength="minlength"
@focus="$emit('onfocus', currentValue)"
@focus="$emit('focus', currentValue)"
@blur="handleBlur">
</textarea>
</div>
@ -162,6 +162,7 @@
'currentValue'(val) {
this.$emit('input', val);
this.$emit('change', val);
this.dispatch('form-item', 'el.form.change', [val]);
}
}