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

阅读 42

2023-10-16

使用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)

0 0 举报