1.<input type="search" @keyup.enter="search()"/> search will not be displayed in the mobile phone input method, but the @keyup.enter event can be used
2.< ;form action="javascript:search()"><input type="search" @keyup.enter="search()"/></form>
Display search in the mobile phone input method, The @keyup.enter event cannot be used, but enter has an effect.
The effect I want to achieve is to display the search button in the mobile phone input method, and at the same time click the search button in the mobile phone input method to implement the search function. Using vue, it is very Puzzled. .
巴扎黑2017-07-04 13:47:33
The problem has been solved
<form action="javascript:void(0)"><input type="search" @keyup.enter="search()"/></form>
PHP中文网2017-07-04 13:47:33
The key point when the word "Search" appears is:
form
element must have the attribute action
attribute value of the input
element is search
But your Vue syntax here is wrong, maybe this is what you want
<template>
<form action="#">
<input type="search" @keyup.enter="search"/>
</form>
</template>
<script>
export default {
// ...
methods: {
// ...
search() {
}
}
}