mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 07:30:12 +01:00
Revert "Adjust the style of the first column of the attribute view" (#10204)
This commit is contained in:
parent
58f9c03a70
commit
0885a46764
7 changed files with 41 additions and 70 deletions
|
|
@ -67,8 +67,8 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: () => void, v
|
|||
e.dataset.pageSize = data.pageSize.toString();
|
||||
}
|
||||
// header
|
||||
let tableHTML = '<div class="av__row av__row--header"><div class="av__colsticky"><div class="av__firstcol"><svg class="av__firstcol--icon av__firstcol--checkbox"><use xlink:href="#iconUncheck"></use></svg></div>';
|
||||
let calcHTML = '<div class="av__colsticky"><div class="av__firstcol"><svg class="av__firstcol--icon"><use xlink:href="#iconMath"></use></svg></div>';
|
||||
let tableHTML = '<div class="av__row av__row--header"><div class="av__firstcol av__colsticky"><svg><use xlink:href="#iconUncheck"></use></svg></div>';
|
||||
let calcHTML = '<div style="width: 24px"></div>';
|
||||
let pinIndex = -1;
|
||||
let pinMaxIndex = -1;
|
||||
let indexWidth = 0;
|
||||
|
|
@ -85,9 +85,9 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: () => void, v
|
|||
}
|
||||
});
|
||||
pinIndex = Math.min(pinIndex, pinMaxIndex);
|
||||
if (pinIndex < 0) {
|
||||
tableHTML += '</div>';
|
||||
calcHTML += '</div>';
|
||||
if (pinIndex > -1) {
|
||||
tableHTML = '<div class="av__row av__row--header"><div class="av__colsticky"><div class="av__firstcol"><svg><use xlink:href="#iconUncheck"></use></svg></div>';
|
||||
calcHTML = '<div class="av__colsticky"><div style="width: 24px"></div>';
|
||||
}
|
||||
data.columns.forEach((column: IAVColumn, index: number) => {
|
||||
if (column.hidden) {
|
||||
|
|
@ -118,15 +118,11 @@ style="width: ${column.width || "200px"}">${getCalcValue(column) || '<svg><use x
|
|||
</div>`;
|
||||
// body
|
||||
data.rows.forEach((row: IAVRow) => {
|
||||
tableHTML += `<div class="av__row" data-id="${row.id}">
|
||||
<div class="av__colsticky">
|
||||
<div class="av__firstcol">
|
||||
<svg class="av__firstcol--icon av__firstcol--checkbox"><use xlink:href="#iconUncheck"></use></svg>
|
||||
</div>
|
||||
`;
|
||||
|
||||
if (pinIndex < 0) {
|
||||
tableHTML += '</div>';
|
||||
tableHTML += `<div class="av__row" data-id="${row.id}">`;
|
||||
if (pinIndex > -1) {
|
||||
tableHTML += '<div class="av__colsticky"><div class="av__firstcol"><svg><use xlink:href="#iconUncheck"></use></svg></div>';
|
||||
} else {
|
||||
tableHTML += '<div class="av__firstcol av__colsticky"><svg><use xlink:href="#iconUncheck"></use></svg></div>';
|
||||
}
|
||||
|
||||
row.cells.forEach((cell, index) => {
|
||||
|
|
@ -197,11 +193,11 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value)}</div>`;
|
|||
${tableHTML}
|
||||
<div class="av__row--util">
|
||||
<div class="av__colsticky">
|
||||
<span class="fn__space"></span>
|
||||
<button class="b3-button" data-type="av-add-bottom">
|
||||
<svg><use xlink:href="#iconAdd"></use></svg>
|
||||
${window.siyuan.languages.addAttr}
|
||||
</button>
|
||||
<span class="fn__space"></span>
|
||||
<button class="b3-button${data.rowCount > data.rows.length ? "" : " fn__none"}">
|
||||
<svg data-type="av-load-more"><use xlink:href="#iconArrowDown"></use></svg>
|
||||
<span data-type="av-load-more">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue