mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
core&ui: problem: fix quick search operation
This commit is contained in:
1 parent
cafe9246c2
commit
7bce252391
2 files changed
+2
-2
No files matched your search
@@ -153,7 +153,7 @@ export class ProblemMainHandler extends Handler {
|
|||||||
if (category.length) this.UiContext.extraTitleContent = category.join(',');
|
if (category.length) this.UiContext.extraTitleContent = category.join(',');
|
||||||
let total = 0;
|
let total = 0;
|
||||||
if (text) {
|
if (text) {
|
||||||
const result = await search(domainId, q, { skip: (page - 1) * limit });
|
const result = await search(domainId, q, { skip: (page - 1) * limit, limit });
|
||||||
total = result.total;
|
total = result.total;
|
||||||
pcountRelation = result.countRelation;
|
pcountRelation = result.countRelation;
|
||||||
if (!result.hits.length) fail = true;
|
if (!result.hits.length) fail = true;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export default new AutoloadPage('omnibar', () => {
|
|||||||
$(document.body).append($entry);
|
$(document.body).append($entry);
|
||||||
const $input = $('.omnibar input') as JQuery<HTMLInputElement>;
|
const $input = $('.omnibar input') as JQuery<HTMLInputElement>;
|
||||||
|
|
||||||
const prefix = window.location.href.startsWith('/d/') ? `/d/${UiContext.domainId}` : '';
|
const prefix = window.location.pathname.startsWith('/d/') ? `/d/${UiContext.domainId}` : '';
|
||||||
let setSearching;
|
let setSearching;
|
||||||
let pdocs = [];
|
let pdocs = [];
|
||||||
let psdict = {};
|
let psdict = {};
|
||||||
|
|||||||
Reference in new issue
Block a user