实时获取搜索框里面的输入内容
2019-04-15 本文已影响0人
洛禾sunshime
获取搜素框里面的内容要绑定input事件
使用例子:
<input type="text" placeholder="输入关键字进行搜索" class="searchinput" @input="search">
search(e) {
this.keyword = e.data;
let that = this;
let timer = setTimeout(() => {
this.getRequire(); // 对应的请求
}, 3000);
},