diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts index 66155dded..c58d73bfb 100644 --- a/app/src/protyle/render/av/cell.ts +++ b/app/src/protyle/render/av/cell.ts @@ -78,6 +78,9 @@ export const genCellValueByElement = (colType: TAVCol, cellElement: HTMLElement) }; if (colType === "block" && textElement.dataset.id) { cellValue.block.id = textElement.dataset.id; + if (textElement.previousElementSibling.classList.contains("b3-menu__avemoji")) { + cellValue.block.icon = textElement.previousElementSibling.getAttribute("data-unicode"); + } } } else if (colType === "mSelect" || colType === "select") { const mSelect: IAVCellSelectValue[] = []; @@ -392,7 +395,7 @@ export const popTextCell = (protyle: IProtyle, cellElements: HTMLElement[], type } if (["text", "email", "phone", "block", "template"].includes(type)) { - html = ``; + html = ``; } else if (type === "url") { html = ``; } else if (type === "number") { @@ -692,7 +695,8 @@ export const updateCellsValue = (protyle: IProtyle, nodeElement: HTMLElement, va } else if (type === "block" && typeof value === "string" && oldValue.block.id) { newValue = { content: value, - id: oldValue.block.id + id: oldValue.block.id, + icon: oldValue.block.icon }; } const cellValue = genCellValue(type, newValue); @@ -786,7 +790,7 @@ export const renderCell = (cellValue: IAVCellValue, rowIndex = 0) => { if (cellValue?.isDetached) { text = `${cellValue.block.content || ""}${window.siyuan.languages.more}`; } else { - text = `${cellValue.block.icon ? `${unicode2Emoji(cellValue.block.icon)}` : ""}${cellValue.block.content || window.siyuan.languages.untitled}${window.siyuan.languages.update}`; + text = `${cellValue.block.icon ? `${unicode2Emoji(cellValue.block.icon)}` : ""}${cellValue.block.content || window.siyuan.languages.untitled}${window.siyuan.languages.update}`; } } else if (cellValue.type === "number") { text = `${cellValue?.number.formattedContent || cellValue?.number.content || ""}`; @@ -874,7 +878,7 @@ const renderRollup = (cellValue: IAVCellValue) => { if (cellValue?.isDetached) { text = `${cellValue.block?.content || window.siyuan.languages.untitled}`; } else { - text = `${cellValue.block.icon ? `${unicode2Emoji(cellValue.block.icon)}` : ""}${cellValue.block?.content || window.siyuan.languages.untitled}`; + text = `${cellValue.block.icon ? `${unicode2Emoji(cellValue.block.icon)}` : ""}${cellValue.block?.content || window.siyuan.languages.untitled}`; } } else if (cellValue.type === "number") { text = cellValue?.number.formattedContent || cellValue?.number.content.toString() || "";