diff --git a/app/src/util/Tree.ts b/app/src/util/Tree.ts index 7e39936a9..c1ac13cf5 100644 --- a/app/src/util/Tree.ts +++ b/app/src/util/Tree.ts @@ -2,6 +2,8 @@ import {getIconByType} from "../editor/getIcon"; import {hasClosestByTag} from "../protyle/util/hasClosest"; import {isMobile} from "./functions"; import {mathRender} from "../protyle/markdown/mathRender"; +import {unicode2Emoji} from "../emoji"; +import {Constants} from "../constants"; export class Tree { public element: HTMLElement; @@ -92,11 +94,20 @@ ${item.label ? "data-label='" + item.label + "'" : ""}> data.forEach((item: IBlock & { subType: string; count: string; + ial?: { + icon: string + } }) => { let countHTML = ""; if (item.count) { countHTML = `${item.count}`; } + let iconHTML; + if (item.type === "NodeDocument") { + iconHTML = `${unicode2Emoji(item.ial.icon || Constants.SIYUAN_IMAGE_FILE)}` + } else { + iconHTML = `` + } html += `
  • - + ${iconHTML} ${item.content} ${countHTML} ${this.blockExtHTML || ""}