本文整理汇总了TypeScript中app/core/services/search_srv.SearchSrv类的典型用法代码示例。如果您正苦于以下问题:TypeScript SearchSrv类的具体用法?TypeScript SearchSrv怎么用?TypeScript SearchSrv使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SearchSrv类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: beforeEach
beforeEach(() => {
backendSrvMock.search = jest.fn().mockReturnValue(Promise.resolve([{ id: 1, title: 'starred' }]));
return searchSrv.search({ query: '' }).then(res => {
results = res;
});
});
示例2: searchDashboards
searchDashboards() {
this.currentSearchId = this.currentSearchId + 1;
var localSearchId = this.currentSearchId;
return this.searchSrv.search(this.query).then(results => {
if (localSearchId < this.currentSearchId) {
return;
}
this.results = results || [];
this.isLoading = false;
this.moveSelection(1);
});
}
示例3: getTags
getTags() {
return this.searchSrv.getDashboardTags();
}