Vanessa 2023-07-28 15:20:34 +08:00
parent 77ed675a6f
commit a231b9e128
4 changed files with 40 additions and 81 deletions

View file

@ -344,7 +344,7 @@ export const popTextCell = (protyle: IProtyle, cellElements: HTMLElement[]) => {
const style = `style="position:absolute;left: ${cellRect.left}px;top: ${cellRect.top}px;width:${Math.max(cellRect.width, 200)}px;height: ${cellRect.height}px"`;
const blockElement = hasClosestBlock(cellElements[0]);
if (type === "block" || type === "text") {
html = `<textarea ${style} class="b3-text-field">${cellElements[0].textContent}</textarea>`;
html = `<textarea ${style} class="b3-text-field">${cellElements[0].firstElementChild.textContent}</textarea>`;
} else if (type === "number") {
html = `<input type="number" value="${cellElements[0].textContent}" ${style} class="b3-text-field">`;
} else if (["select", "mSelect"].includes(type) && blockElement) {

View file

@ -64,7 +64,7 @@ style="width: ${column.width || "200px"}">${getCalcValue(column) || '<svg><use x
} else if (cell.valueType === "block") {
text = `<span class="av__celltext">${cell.value?.block.content || ""}</span>`;
if (cell.value?.block.id) {
text += `<span class="b3-chip b3-chip--small" data-type="block-ref" data-id="${cell.value.block.id}" data-subtype="s">${window.siyuan.languages.openBy}</span>`;
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>`;
}
} else if (cell.valueType === "number") {
text = `<span class="av__celltext">${cell.value?.number.content || ""}</span>`;