mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-25 17:56:09 +01:00
🎨 Add Relation and Rollup column to database table view https://github.com/siyuan-note/siyuan/issues/9888
This commit is contained in:
parent
50b76c7294
commit
940dff4c7f
2 changed files with 27 additions and 11 deletions
|
|
@ -142,10 +142,14 @@ func (value *Value) String() string {
|
|||
}
|
||||
return ""
|
||||
case KeyTypeRelation:
|
||||
if nil == value.Relation {
|
||||
if 1 > len(value.Relation.Contents) {
|
||||
return ""
|
||||
}
|
||||
return value.Relation.Content
|
||||
var ret []string
|
||||
for _, v := range value.Relation.Contents {
|
||||
ret = append(ret, v)
|
||||
}
|
||||
return strings.Join(ret, " ")
|
||||
case KeyTypeRollup:
|
||||
if nil == value.Rollup {
|
||||
return ""
|
||||
|
|
@ -463,7 +467,7 @@ type ValueCheckbox struct {
|
|||
}
|
||||
|
||||
type ValueRelation struct {
|
||||
Content string `json:"content"`
|
||||
Contents []string `json:"contents"`
|
||||
BlockIDs []string `json:"blockIDs"`
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue