ios中设置input输入框type属性为search的时候,在ios中不生效,解决方法外层套一层form标签需要阻止表单的提交事件
<form action="" @submit.prevent=""> <span></span> <span class="search-icon"></span> <input type="search" placeholder="搜索关键词" v-model="keywords"> <i class="fa-delete" @click="emptyInput"></i> <router-link class="cancel" to="/home">取消</router-link> </form>