优化搜索

This commit is contained in:
TOP糯米 2023-03-19 14:07:39 +08:00
parent b64efac97f
commit f6a0a69374
1 changed files with 2 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<app-layout minHeight="unset" btnType="unset" title="分类"> <app-layout minHeight="unset" btnType="unset" title="分类">
<view class="search-component"> <view class="search-component">
<widget-search @input="inputKeywords" /> <widget-search v-model="keywords" @input="inputKeywords" />
</view> </view>
<view class="cate"> <view class="cate">
<app-cate <app-cate
@ -162,8 +162,7 @@ export default {
/** /**
* 搜索 * 搜索
*/ */
inputKeywords(kw) { inputKeywords() {
this.keywords = kw;
clearTimeout(this.keywordsTimer); clearTimeout(this.keywordsTimer);
this.keywordsTimer = setTimeout(async () => { this.keywordsTimer = setTimeout(async () => {
this.data = []; this.data = [];