Input add @on-search event

This commit is contained in:
梁灏 2018-06-27 15:40:03 +08:00
parent e2a877c46a
commit 1e17564989
2 changed files with 11 additions and 4 deletions

View file

@ -218,6 +218,7 @@
methods: {
handleEnter (event) {
this.$emit('on-enter', event);
if (this.search) this.$emit('on-search', this.currentValue);
},
handleKeydown (event) {
this.$emit('on-keydown', event);
@ -292,8 +293,9 @@
this.$emit('on-change', e);
},
handleSearch () {
if (this.disable) return false;
if (this.disabled) return false;
this.$refs.input.focus();
this.$emit('on-search', this.currentValue);
}
},
watch: {