This commit is contained in:
Daniel 2024-09-27 11:38:53 +08:00
parent 357d1fd22c
commit ccc09569e0
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 8 additions and 4 deletions

View file

@ -1393,6 +1393,7 @@ const onSearch = (data: IBlock[], edit: Protyle, element: Element, config: Confi
let resultHTML = "";
data.forEach((item, index) => {
const title = getNotebookName(item.box) + getDisplayName(item.hPath, false);
const tags = item.tag ? `<span class="b3-list-item__meta b3-list-item__meta--ellipsis">${item.tag.split("# #").map(tag => `${tag.replace("#", "")}`).join(" ").replace("#", "")}</span>` : "";
if (item.children) {
resultHTML += `<div class="b3-list-item">
<span class="b3-list-item__toggle b3-list-item__toggle--hl">
@ -1416,6 +1417,7 @@ ${getAttr(childItem)}
${unicode2Emoji(item.ial.icon, "b3-list-item__graphic", true)}
<span class="b3-list-item__text">${item.content}</span>
${getAttr(item)}
${tags}
<span class="b3-list-item__meta b3-list-item__meta--ellipsis ariaLabel" aria-label="${escapeAriaLabel(title)}">${escapeGreat(title)}</span>
</div>`;
}

View file

@ -668,6 +668,7 @@ interface IBlock {
name?: string;
memo?: string;
alias?: string;
tag?: string;
refs?: IBlock[];
children?: IBlock[]
length?: number