Vanessa
2026-06-24 22:58:42 +08:00
parent 7ba570f425
commit 8dd363382a
2 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -226,7 +226,7 @@ ${childItem.tag ? `<span class="b3-list-item__meta b3-list-item__meta--ellipsis"
</div>`;
listElement.scrollTop = 0;
let countHTML = "";
if (response) {
if (response && response.data.matchedBlockCount > 0) {
let text = window.siyuan.languages.findInDoc.replace("${x}", response.data.matchedRootCount).replace("${y}", response.data.matchedBlockCount);
if (response.data.docMode) {
text = window.siyuan.languages.matchDoc.replace("${x}", response.data.matchedRootCount);
+9 -5
View File
@@ -1376,12 +1376,16 @@ export const inputEvent = (element: Element, config: Config.IUILayoutTabSearchCo
nextElement.setAttribute("disabled", "disabled");
}
onSearch(response.data.blocks, edit, element, config, focusId);
let text = window.siyuan.languages.findInDoc.replace("${x}", response.data.matchedRootCount).replace("${y}", response.data.matchedBlockCount);
if (response.data.docMode) {
text = window.siyuan.languages.matchDoc.replace("${x}", response.data.matchedRootCount);
}
searchResultElement.innerHTML = `${config.page}/${response.data.pageCount || 1}<span class="fn__space"></span>
if (response.data.matchedBlockCount > 0) {
let text = window.siyuan.languages.findInDoc.replace("${x}", response.data.matchedRootCount).replace("${y}", response.data.matchedBlockCount);
if (response.data.docMode) {
text = window.siyuan.languages.matchDoc.replace("${x}", response.data.matchedRootCount);
}
searchResultElement.innerHTML = `${config.page}/${response.data.pageCount || 1}<span class="fn__space"></span>
<span class="ft__on-surface">${text}</span>`;
} else {
searchResultElement.innerHTML = "";
}
loadingElement.classList.add("fn__none");
searchResultElement.setAttribute("data-pagecount", response.data.pageCount || 1);
});