mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
✨ Database kanban view https://github.com/siyuan-note/siyuan/issues/8873
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
b8538772f8
commit
2d8f4a3030
3 changed files with 9 additions and 1 deletions
|
|
@ -766,6 +766,11 @@ func (av *AttributeView) Clone() (ret *AttributeView) {
|
||||||
for _, cardField := range view.Gallery.CardFields {
|
for _, cardField := range view.Gallery.CardFields {
|
||||||
cardField.ID = keyIDMap[cardField.ID]
|
cardField.ID = keyIDMap[cardField.ID]
|
||||||
}
|
}
|
||||||
|
case LayoutTypeKanban:
|
||||||
|
view.Kanban.ID = ast.NewNodeID()
|
||||||
|
for _, field := range view.Kanban.Fields {
|
||||||
|
field.ID = keyIDMap[field.ID]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
view.ItemIDs = []string{}
|
view.ItemIDs = []string{}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,9 @@ func NewViewBaseInstance(view *View) *BaseInstance {
|
||||||
case LayoutTypeGallery:
|
case LayoutTypeGallery:
|
||||||
showIcon = view.Gallery.ShowIcon
|
showIcon = view.Gallery.ShowIcon
|
||||||
wrapField = view.Gallery.WrapField
|
wrapField = view.Gallery.WrapField
|
||||||
|
case LayoutTypeKanban:
|
||||||
|
showIcon = view.Kanban.ShowIcon
|
||||||
|
wrapField = view.Kanban.WrapField
|
||||||
}
|
}
|
||||||
return &BaseInstance{
|
return &BaseInstance{
|
||||||
ID: view.ID,
|
ID: view.ID,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ import (
|
||||||
type LayoutKanban struct {
|
type LayoutKanban struct {
|
||||||
*BaseLayout
|
*BaseLayout
|
||||||
|
|
||||||
GroupFields []*ViewKanbanField `json:"field"` // 字段
|
Fields []*ViewKanbanField `json:"fields"` // 字段
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewLayoutKanban() *LayoutKanban {
|
func NewLayoutKanban() *LayoutKanban {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue