From 17a8e8d7770072023b33feac203fb6f645bd5f7a Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Wed, 27 Dec 2017 10:50:11 +0800
Subject: [PATCH] 响应式搜索
---
src/app/routes/devices/version/version.component.ts | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/app/routes/devices/version/version.component.ts b/src/app/routes/devices/version/version.component.ts
index 28cc822..72fddc4 100644
--- a/src/app/routes/devices/version/version.component.ts
+++ b/src/app/routes/devices/version/version.component.ts
@@ -66,24 +66,22 @@
ngOnInit() {
this.initPage();
this.queryTextStream
- .debounceTime(1000)
+ .debounceTime(500)
.distinctUntilChanged()
.subscribe(queryText => {
this.load();
});
}
queryTextChanged($event) {
- // tslint:disable-next-line:no-debugger
- debugger;
- this.queryTextStream.next(this.queryText);
+ this.queryTextStream.next(this.queryMap.value);
}
load(reload: boolean = false) {
if (reload) {
this.grid.pageIndex = 1 ;
}
- this.versionService.getPagingList(this.grid, this.queryText).subscribe(
+ this.versionService.getPagingList(this.grid, this.queryMap.value).subscribe(
(res: PageBean) => {
- if (res.total > 0 && res.data != null) {
+ if (res != null && res.data != null) {
this.grid.initData(res);
this.grid.refreshStatus();
}
--
Gitblit v1.8.0