mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 06:30:14 +01:00
🎨 汇总主键添加 emoji
This commit is contained in:
parent
71ac6d648b
commit
9a605e8692
1 changed files with 3 additions and 3 deletions
|
|
@ -994,7 +994,7 @@ export const renderCell = (cellValue: IAVCellValue, rowIndex = 0, showIcon = tru
|
||||||
text += "</div>";
|
text += "</div>";
|
||||||
} else if (cellValue.type === "rollup") {
|
} else if (cellValue.type === "rollup") {
|
||||||
cellValue?.rollup?.contents?.forEach((item) => {
|
cellValue?.rollup?.contents?.forEach((item) => {
|
||||||
const rollupText = ["template", "select", "mSelect", "mAsset", "checkbox", "relation"].includes(item.type) ? renderCell(item, rowIndex, showIcon, type) : renderRollup(item);
|
const rollupText = ["template", "select", "mSelect", "mAsset", "checkbox", "relation"].includes(item.type) ? renderCell(item, rowIndex, showIcon, type) : renderRollup(item, showIcon);
|
||||||
if (rollupText) {
|
if (rollupText) {
|
||||||
text += rollupText + ", ";
|
text += rollupText + ", ";
|
||||||
}
|
}
|
||||||
|
|
@ -1028,7 +1028,7 @@ export const renderCell = (cellValue: IAVCellValue, rowIndex = 0, showIcon = tru
|
||||||
return text;
|
return text;
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderRollup = (cellValue: IAVCellValue) => {
|
const renderRollup = (cellValue: IAVCellValue, showIcon: boolean) => {
|
||||||
let text = "";
|
let text = "";
|
||||||
if (["text"].includes(cellValue.type)) {
|
if (["text"].includes(cellValue.type)) {
|
||||||
text = cellValue ? (cellValue[cellValue.type as "text"].content || "") : "";
|
text = cellValue ? (cellValue[cellValue.type as "text"].content || "") : "";
|
||||||
|
|
@ -1046,7 +1046,7 @@ const renderRollup = (cellValue: IAVCellValue) => {
|
||||||
if (cellValue?.isDetached) {
|
if (cellValue?.isDetached) {
|
||||||
text = `<span class="av__celltext">${Lute.EscapeHTMLStr(cellValue.block?.content || window.siyuan.languages.untitled)}</span>`;
|
text = `<span class="av__celltext">${Lute.EscapeHTMLStr(cellValue.block?.content || window.siyuan.languages.untitled)}</span>`;
|
||||||
} else {
|
} else {
|
||||||
text = `<span data-type="block-ref" data-id="${cellValue.block?.id}" data-subtype="s" class="av__celltext av__celltext--ref">${Lute.EscapeHTMLStr(cellValue.block?.content || window.siyuan.languages.untitled)}</span>`;
|
text = `<span class="b3-menu__avemoji${showIcon ? "" : " fn__none"}" data-unicode="${cellValue.block.icon || ""}">${unicode2Emoji(cellValue.block.icon || window.siyuan.storage[Constants.LOCAL_IMAGES].file)}</span><span data-type="block-ref" data-id="${cellValue.block?.id}" data-subtype="s" class="av__celltext av__celltext--ref">${Lute.EscapeHTMLStr(cellValue.block?.content || window.siyuan.languages.untitled)}</span>`;
|
||||||
}
|
}
|
||||||
} else if (cellValue.type === "number") {
|
} else if (cellValue.type === "number") {
|
||||||
text = cellValue?.number.formattedContent || cellValue?.number.content.toString() || "";
|
text = cellValue?.number.formattedContent || cellValue?.number.content.toString() || "";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue