mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-19 02:21:38 +08:00
This commit is contained in:
parent
d215c2e0e2
commit
7a7933d201
@ -127,15 +127,17 @@ export const genAVValueHTML = (value: IAVCellValue) => {
|
|||||||
break;
|
break;
|
||||||
case "relation":
|
case "relation":
|
||||||
value?.relation?.contents?.forEach((item) => {
|
value?.relation?.contents?.forEach((item) => {
|
||||||
if (item) {
|
if (item && item.block) {
|
||||||
const rollupText = genAVRollupHTML(item);
|
if (item?.isDetached) {
|
||||||
if (rollupText) {
|
html += `<span class="av__cell--relation"><span>➖ </span><span class="av__celltext" data-id="${item.block?.id}">${Lute.EscapeHTMLStr(item.block.content || window.siyuan.languages.untitled)}</span></span>`;
|
||||||
html += rollupText + ", ";
|
} else {
|
||||||
|
// data-block-id 用于更新 emoji
|
||||||
|
html += `<span class="av__cell--relation" data-block-id="${item.block.id}"><span class="b3-menu__avemoji" data-unicode="${item.block.icon || ""}">${unicode2Emoji(item.block.icon || window.siyuan.storage[Constants.LOCAL_IMAGES].file)}</span><span data-type="block-ref" data-id="${item.block.id}" data-subtype="s" class="av__celltext av__celltext--ref">${Lute.EscapeHTMLStr(item.block.content || window.siyuan.languages.untitled)}</span></span>`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (html && html.endsWith(", ")) {
|
if (html && html.endsWith(", ")) {
|
||||||
html = html.substring(0, html.length - 7);
|
html = html.substring(0, html.length - 2);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "rollup":
|
case "rollup":
|
||||||
|
Loading…
Reference in New Issue
Block a user