Bläddra i källkod

:art: Add Rollup column to database table view https://github.com/siyuan-note/siyuan/issues/9958

Daniel 1 år sedan
förälder
incheckning
31442f45d6
1 ändrade filer med 4 tillägg och 0 borttagningar
  1. 4 0
      kernel/model/attribute_view.go

+ 4 - 0
kernel/model/attribute_view.go

@@ -1995,6 +1995,10 @@ func addAttributeViewColumn(operation *Operation) (err error) {
 			icon = operation.Data.(string)
 		}
 		key := av.NewKey(operation.ID, operation.Name, icon, keyType)
+		if av.KeyTypeRollup == keyType {
+			key.Rollup = &av.Rollup{Calc: &av.RollupCalc{Operator: av.CalcOperatorNone}}
+		}
+
 		attrView.KeyValues = append(attrView.KeyValues, &av.KeyValues{Key: key})
 
 		for _, view := range attrView.Views {