From a368d6fc4b73c5ee1cfbdf12ec507968a97cc3d9 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 26 Jan 2025 11:00:10 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/13945 --- app/src/protyle/render/av/action.ts | 6 +----- app/src/protyle/render/av/blockAttr.ts | 2 +- app/src/protyle/render/av/cell.ts | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts index 0091f0b6a..22ad57d9d 100644 --- a/app/src/protyle/render/av/action.ts +++ b/app/src/protyle/render/av/action.ts @@ -241,11 +241,7 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle h: rect.height, w: rect.width, }, (unicode) => { - if (target.parentElement.classList.contains("av__cell--relation")) { - target.innerHTML = unicode2Emoji(unicode || window.siyuan.storage[Constants.LOCAL_IMAGES].file); - } else { - target.innerHTML = unicode2Emoji(unicode); - } + target.innerHTML = unicode2Emoji(unicode || window.siyuan.storage[Constants.LOCAL_IMAGES].file); }, target.querySelector("img")); event.preventDefault(); event.stopPropagation(); diff --git a/app/src/protyle/render/av/blockAttr.ts b/app/src/protyle/render/av/blockAttr.ts index 432445552..fcb8ff79e 100644 --- a/app/src/protyle/render/av/blockAttr.ts +++ b/app/src/protyle/render/av/blockAttr.ts @@ -61,7 +61,7 @@ export const genAVValueHTML = (value: IAVCellValue) => { let html = ""; switch (value.type) { case "block": - html = ``; + html = ``; break; case "text": html = ``; diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts index 9e7680bad..e74def78e 100644 --- a/app/src/protyle/render/av/cell.ts +++ b/app/src/protyle/render/av/cell.ts @@ -796,7 +796,7 @@ export const renderCell = (cellValue: IAVCellValue, rowIndex = 0) => { if (cellValue?.isDetached) { text = `${Lute.EscapeHTMLStr(cellValue.block.content || "")}${window.siyuan.languages.more}`; } else { - text = `${cellValue.block.icon ? `${unicode2Emoji(cellValue.block.icon)}` : ""}${Lute.EscapeHTMLStr(cellValue.block.content)}${window.siyuan.languages.update}`; + text = `${unicode2Emoji(cellValue.block.icon || window.siyuan.storage[Constants.LOCAL_IMAGES].file)}${Lute.EscapeHTMLStr(cellValue.block.content)}${window.siyuan.languages.update}`; } } else if (cellValue.type === "number") { text = `${cellValue?.number.formattedContent || cellValue?.number.content || ""}`;