<input type="text" :value="inputValue" @focus="vauleEmpty"/>
1,动态的绑定value并为其将值设置为inputValue属性,因为默认的值是搜索商品名称或品牌
2,@fous属性是uni-app中方法,当input标签获得光标时,就会触发valueEmpty方法
methods:{
valueEmpty(e){
return this.inputValue='';
}
}
<input type="text" :value="inputValue" @focus="vauleEmpty"/>
1,动态的绑定value并为其将值设置为inputValue属性,因为默认的值是搜索商品名称或品牌
2,@fous属性是uni-app中方法,当input标签获得光标时,就会触发valueEmpty方法
methods:{
valueEmpty(e){
return this.inputValue='';
}
}