mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
Add database lineNumber field type (#11008)
* 🎨 add database lineNumber type * 🎨 fix https://github.com/siyuan-note/siyuan/issues/10896 * 🎨 Improve mobile app appearance language https://github.com/siyuan-note/siyuan/issues/11009 * 🎨 Improve database template field calc https://github.com/siyuan-note/siyuan/issues/11011 * ⬆️ Upgrade kernel deps * ⬆️ Upgrade kernel deps * 🎨 fix https://github.com/siyuan-note/siyuan/issues/10896 * 🎨 fix https://github.com/siyuan-note/siyuan/issues/10896 * 🐛 https://github.com/siyuan-note/siyuan/issues/11015 * 🐛 https://github.com/siyuan-note/siyuan/issues/11018 * 🐛 https://github.com/siyuan-note/siyuan/issues/11018 * 🎨 刚创建时无 id,更新需和 oldValue 保持一致 * 🐛 Database date field between filter calculation error Fix https://github.com/siyuan-note/siyuan/issues/10979 * 🐛 Primary key value unexpectedly updated when database adds row https://github.com/siyuan-note/siyuan/issues/11018 * 🎨 https://github.com/siyuan-note/siyuan/issues/11013 * 🎨 搜索可汇总字段时排除行号类型字段 https://github.com/siyuan-note/siyuan/pull/11008 * 🎨 lineNumber no need to join the calc op and remove useless todo tag --------- Co-authored-by: Vanessa <lly219@gmail.com> Co-authored-by: Daniel <845765@qq.com>
This commit is contained in:
parent
afeea6a80e
commit
8a354da50a
16 changed files with 224 additions and 108 deletions
|
|
@ -129,8 +129,16 @@ style="width: ${column.width || "200px"};">
|
|||
if (pinIndex === index) {
|
||||
tableHTML += "</div>";
|
||||
}
|
||||
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: ${index === 0 ? ((parseInt(column.width || "200") + 24) + "px") : (column.width || "200px")}">${getCalcValue(column) || '<svg><use xlink:href="#iconDown"></use></svg>' + window.siyuan.languages.calc}</div>`;
|
||||
|
||||
// lineNumber type 不参与计算操作
|
||||
if (column.type === "lineNumber") {
|
||||
calcHTML += `<div data-col-id="${column.id}" data-dtype="${column.type}"
|
||||
style="display: flex; width: ${index === 0 ? ((parseInt(column.width || "200") + 24) + "px") : (column.width || "200px")}"> </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: ${index === 0 ? ((parseInt(column.width || "200") + 24) + "px") : (column.width || "200px")}">${getCalcValue(column) || '<svg><use xlink:href="#iconDown"></use></svg>' + window.siyuan.languages.calc}</div>`;
|
||||
}
|
||||
|
||||
if (pinIndex === index) {
|
||||
calcHTML += "</div>";
|
||||
}
|
||||
|
|
@ -142,7 +150,7 @@ style="width: ${index === 0 ? ((parseInt(column.width || "200") + 24) + "px") :
|
|||
</div>
|
||||
</div>`;
|
||||
// body
|
||||
data.rows.forEach((row: IAVRow) => {
|
||||
data.rows.forEach((row: IAVRow, rowIndex: number) => {
|
||||
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>';
|
||||
|
|
@ -165,7 +173,7 @@ ${cell.value?.isDetached ? ' data-detached="true"' : ""}
|
|||
style="width: ${data.columns[index].width || "200px"};
|
||||
${cell.valueType === "number" ? "text-align: right;" : ""}
|
||||
${cell.bgColor ? `background-color:${cell.bgColor};` : ""}
|
||||
${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value)}</div>`;
|
||||
${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value, rowIndex)}</div>`;
|
||||
|
||||
if (pinIndex === index) {
|
||||
tableHTML += "</div>";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue