ソースを参照

:art: Improve database paging loading https://github.com/siyuan-note/siyuan/issues/12780

Daniel 8 ヶ月 前
コミット
2da376c7c9
1 ファイル変更6 行追加0 行削除
  1. 6 0
      kernel/api/av.go

+ 6 - 0
kernel/api/av.go

@@ -560,12 +560,18 @@ func renderAttributeView(c *gin.Context) {
 
 
 	var views []map[string]interface{}
 	var views []map[string]interface{}
 	for _, v := range attrView.Views {
 	for _, v := range attrView.Views {
+		pSize := 10
+		if nil != v.Table && av.LayoutTypeTable == v.LayoutType {
+			pSize = v.Table.PageSize
+		}
+
 		view := map[string]interface{}{
 		view := map[string]interface{}{
 			"id":               v.ID,
 			"id":               v.ID,
 			"icon":             v.Icon,
 			"icon":             v.Icon,
 			"name":             v.Name,
 			"name":             v.Name,
 			"hideAttrViewName": v.HideAttrViewName,
 			"hideAttrViewName": v.HideAttrViewName,
 			"type":             v.LayoutType,
 			"type":             v.LayoutType,
+			"pageSize":         pSize,
 		}
 		}
 
 
 		views = append(views, view)
 		views = append(views, view)