bugfix] Search: trigger blur after click search button (#1448)

This commit is contained in:
SnowZhangXl 2018-07-10 21:23:07 +08:00 committed by neverland
parent 1aab05c4d3
commit 91f45ac61b
2 changed files with 4 additions and 0 deletions

View File

@ -162,6 +162,9 @@ export default create({
event.preventDefault();
}
}
if (this.type === 'search' && event.keyCode === 13) {
this.blur();
}
this.$emit('keypress', event);
},

View File

@ -21,6 +21,7 @@
width: 100%;
resize: none;
display: block;
line-height: normal;
box-sizing: border-box;
background-color: transparent;