From e58316187232a0489e9e004bc038f404ca7f5948 Mon Sep 17 00:00:00 2001 From: Junjie <540245094@qq.com> Date: 星期三, 23 七月 2025 10:03:43 +0800 Subject: [PATCH] # --- pages/basics/combQuery.vue | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pages/basics/combQuery.vue b/pages/basics/combQuery.vue index 8493af9..1a5b1e3 100644 --- a/pages/basics/combQuery.vue +++ b/pages/basics/combQuery.vue @@ -5,7 +5,7 @@ <view class="searchBox"> <view class="searchIcon"><uni-icons type="search" size="20" color="#dadada"></uni-icons></view> <view class="searchArea"> - <input v-model="barcode" type="text" placeholder="鎵樼洏鐮�" @input="searchByBarcode" + <input v-model="barcode" type="text" placeholder="鎵樼洏鐮�" @input="searchByBarcodeTime" placeholder-style="line-height: 85rpx;"> </view> <view class="closeIcon"><uni-icons type="closeempty" size="20" color="#dadada" @@ -67,8 +67,8 @@ return { commonUrl: null, matList: [], - barcode: null - + barcode: null, + timeout: null, } }, mounted() { @@ -146,6 +146,12 @@ } }) }, + searchByBarcodeTime() { + clearTimeout(this.timeout) + this.timeout = setTimeout(() => { + this.searchByBarcode() + },600) + }, // 鏍规嵁鎵樼洏鐮佹悳绱� searchByBarcode() { let that = this -- Gitblit v1.9.1