This commit is contained in:
parent
9e14e24efb
commit
81db6b2a63
4 changed files with 8 additions and 6 deletions
|
@ -115,7 +115,6 @@
|
|||
}
|
||||
|
||||
&:hover {
|
||||
[data-type="block-ref"],
|
||||
[data-type="block-more"] {
|
||||
display: block;
|
||||
}
|
||||
|
@ -250,7 +249,6 @@
|
|||
cursor: pointer;
|
||||
// display: flex; 不需要使用,否则 av__celltext 会占满单元格,导致链接列点击空白无法进行编辑
|
||||
|
||||
[data-type="block-ref"],
|
||||
[data-type="block-more"] {
|
||||
display: none;
|
||||
position: absolute;
|
||||
|
|
|
@ -229,7 +229,7 @@
|
|||
background-color: var(--b3-theme-secondary);
|
||||
}
|
||||
|
||||
span[data-type~="block-ref"],
|
||||
span[data-type~="block-ref"]:not(.av__celltext),
|
||||
span[data-type~="file-annotation-ref"] {
|
||||
color: var(--b3-protyle-inline-blockref-color);
|
||||
opacity: .86;
|
||||
|
|
|
@ -153,6 +153,9 @@ export const genCellValue = (colType: TAVCol, value: string | any) => {
|
|||
};
|
||||
}
|
||||
}
|
||||
if (colType === "block") {
|
||||
cellValue.isDetached = true;
|
||||
}
|
||||
return cellValue;
|
||||
};
|
||||
|
||||
|
|
|
@ -148,11 +148,12 @@ style="width: ${column.width || "200px"}">${getCalcValue(column) || '<svg><use x
|
|||
}
|
||||
text = `<span class="av__celltext av__celltext--url" data-type="${cell.valueType}"${urlAttr}>${urlContent}</span>`;
|
||||
} else if (cell.valueType === "block") {
|
||||
text = `<span class="av__celltext${cell.value?.isDetached ? "" : " av__celltext--ref"}">${cell.value.block.content || ""}</span>`;
|
||||
if (cell.value?.isDetached) {
|
||||
text += `<span class="b3-chip b3-chip--info b3-chip--small" data-type="block-more" >${window.siyuan.languages.more}</span>`;
|
||||
text = `<span class="av__celltext${cell.value?.isDetached ? "" : " av__celltext--ref"}">${cell.value.block.content || ""}</span>
|
||||
<span class="b3-chip b3-chip--info b3-chip--small" data-type="block-more">${window.siyuan.languages.more}</span>`;
|
||||
} else {
|
||||
text += `<span class="b3-chip b3-chip--info b3-chip--small" data-type="block-ref" data-id="${cell.value.block.id}" data-subtype="s">${window.siyuan.languages.openBy}</span>`;
|
||||
text = `<span data-type="block-ref" data-id="${cell.value.block.id}" data-subtype="s" class="av__celltext${cell.value?.isDetached ? "" : " av__celltext--ref"}">${cell.value.block.content || ""}</span>
|
||||
<span class="b3-chip b3-chip--info b3-chip--small" data-type="block-more">${window.siyuan.languages.update}</span>`;
|
||||
}
|
||||
} else if (cell.valueType === "number") {
|
||||
text = `<span style="float: right;${data.columns[index].wrap ? "word-break: break-word;" : ""}" class="av__celltext" data-content="${cell.value?.number.isNotEmpty ? cell.value?.number.content : ""}">${cell.value?.number.formattedContent || ""}</span>`;
|
||||
|
|
Loading…
Add table
Reference in a new issue