0
点赞
收藏
分享

微信扫一扫

玩转ChatGPT:图像识别(vol. 1)

使用Ant Design of Vue 1版本,实现搜索框。

html部分

<a-input-search placeholder="请输入" v-model.value="searchText" @input="onInput" @search="onSearch" />

js部分

export default{
	data(){
		return{
			searchText:''
		}
	},
	methods:{
		//输入时获取值
		onInput(e){
			console.log(e.target.value)
		},
		//搜索时获取值
		onSearch(value){
			console.log(value)
		},
		//清空输入框的值
		clearValue(){
			this.searchText="";
		}
	}
}
举报

相关推荐

0 条评论