mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-25 17:56:09 +01:00
This commit is contained in:
parent
d275f20a4d
commit
bb39a811f8
1 changed files with 3 additions and 4 deletions
|
|
@ -559,8 +559,8 @@ export class Background {
|
|||
let searchHTML = "";
|
||||
let hasKey = false;
|
||||
const currentTags = this.getTags();
|
||||
response.data.tags.forEach((item: string) => {
|
||||
searchHTML += `<div class="b3-list-item b3-list-item--narrow">
|
||||
response.data.tags.forEach((item: string, index: number) => {
|
||||
searchHTML += `<div class="b3-list-item b3-list-item--narrow${index === 0 ? " b3-list-item--focus" : ""}">
|
||||
<div class="fn__flex-1">${item}</div>
|
||||
${currentTags.includes(Lute.UnEscapeHTMLStr(item.replace(/<mark>/g, "").replace(/<\/mark>/g, ""))) ? '<svg class="b3-menu__checked"><use xlink:href="#iconSelect"></use></svg>' : ""}
|
||||
</div>`;
|
||||
|
|
@ -569,10 +569,9 @@ export class Background {
|
|||
}
|
||||
});
|
||||
if (!hasKey && response.data.k) {
|
||||
searchHTML = `<div class="b3-list-item b3-list-item--narrow"><mark>${escapeHtml(response.data.k)}</mark></div>` + searchHTML;
|
||||
searchHTML = `<div class="b3-list-item b3-list-item--narrow${searchHTML ? "" : " b3-list-item--focus"}">${window.siyuan.languages.new} <mark>${escapeHtml(response.data.k)}</mark></div>` + searchHTML;
|
||||
}
|
||||
listElement.innerHTML = searchHTML;
|
||||
listElement.firstElementChild.classList.add("b3-list-item--focus");
|
||||
});
|
||||
});
|
||||
listElement.addEventListener("click", (event) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue