mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 Database table view supports paged loading https://github.com/siyuan-note/siyuan/issues/9424
This commit is contained in:
parent
1d54de679f
commit
7a2f8d17f1
2 changed files with 2 additions and 0 deletions
|
|
@ -580,6 +580,7 @@ type Table struct {
|
||||||
Columns []*TableColumn `json:"columns"` // 表格列
|
Columns []*TableColumn `json:"columns"` // 表格列
|
||||||
Rows []*TableRow `json:"rows"` // 表格行
|
Rows []*TableRow `json:"rows"` // 表格行
|
||||||
RowCount int `json:"rowCount"` // 表格总行数
|
RowCount int `json:"rowCount"` // 表格总行数
|
||||||
|
PageSize int `json:"pageSize"` // 每页行数
|
||||||
}
|
}
|
||||||
|
|
||||||
type TableColumn struct {
|
type TableColumn struct {
|
||||||
|
|
|
||||||
|
|
@ -624,6 +624,7 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View, page, p
|
||||||
|
|
||||||
// 分页
|
// 分页
|
||||||
ret.RowCount = len(ret.Rows)
|
ret.RowCount = len(ret.Rows)
|
||||||
|
ret.PageSize = view.Table.PageSize
|
||||||
if 0 < pageSize {
|
if 0 < pageSize {
|
||||||
start := (page - 1) * pageSize
|
start := (page - 1) * pageSize
|
||||||
end := start + pageSize
|
end := start + pageSize
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue