uni-app 获取input的值
<input v-model="search" :value="search" @input="messagesearch" type="text" placeholder="请输入HScode" /><view @click="searchClick">点击</view>data() {return {search: ''};},messagesearch:f
·
<input v-model="search" :value="search" @input="messagesearch" type="text" placeholder="请输入HScode" />
<view @click="searchClick">点击</view>
data() {
return {
search: ''
};
},
messagesearch:function(event){
// 这里动态获取VALUE 值
// console.log(event.target.value)
this.search = event.target.value;
},
searchClick(){
console.log(this.search);
}
更多推荐
已为社区贡献1条内容
所有评论(0)