javascript - js displays the search function in the mobile phone input method
过去多啦不再A梦
过去多啦不再A梦 2017-07-04 13:45:33
0
2
1035

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. .

过去多啦不再A梦
过去多啦不再A梦

reply all(2)
巴扎黑

The problem has been solved
<form action="javascript:void(0)"><input type="search" @keyup.enter="search()"/></form>

洪涛

The key point when the word "Search" appears is:

    The
  1. form element must have the attribute action

  2. The
  3. type

    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() {
        }
    }
}
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template