Vanessa 2024-05-27 16:56:46 +08:00
parent 4066348644
commit f095c98c71
3 changed files with 8 additions and 1 deletions

View file

@ -192,6 +192,10 @@
white-space: nowrap;
cursor: pointer;
&[data-dtype="lineNumber"] {
cursor: inherit;
}
&:first-child {
padding-left: 1.625em;
box-sizing: initial;

View file

@ -108,6 +108,9 @@ export const openCalcMenu = async (protyle: IProtyle, calcElement: HTMLElement,
oldOperator = calcElement.dataset.operator;
blockID = blockElement.dataset.nodeId;
}
if (type === "lineNumber") {
return;
}
const menu = new Menu("av-calc", () => {
if (rowElement) {
rowElement.classList.remove("av__row--show");

View file

@ -140,7 +140,7 @@ style="width: ${column.width || "200px"};">
if (column.type === "lineNumber") {
// lineNumber type 不参与计算操作
calcHTML += `<div data-col-id="${column.id}" data-dtype="${column.type}" style="width: ${column.width || "200px"}">&nbsp;</div>`;
calcHTML += `<div data-col-id="${column.id}" data-dtype="${column.type}" class="av__calc" style="width: ${column.width || "200px"}">&nbsp;</div>`;
} else {
calcHTML += `<div class="av__calc${column.calc && column.calc.operator !== "" ? " av__calc--ashow" : ""}" data-col-id="${column.id}" data-dtype="${column.type}" data-operator="${column.calc?.operator || ""}"
style="width: ${column.width || "200px"}">${getCalcValue(column) || '<svg><use xlink:href="#iconDown"></use></svg>' + window.siyuan.languages.calc}</div>`;