mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-17 20:48:06 +01:00
♻️ Refactor av data structure
This commit is contained in:
parent
e24a7f5d01
commit
e66fc9c096
1 changed files with 1 additions and 4 deletions
|
|
@ -130,7 +130,6 @@ type View struct {
|
||||||
ID string `json:"id"` // 视图 ID
|
ID string `json:"id"` // 视图 ID
|
||||||
Name string `json:"name"` // 视图名称
|
Name string `json:"name"` // 视图名称
|
||||||
|
|
||||||
LayoutID string `json:"layoutID"` // 当前布局 ID
|
|
||||||
LayoutType LayoutType `json:"type"` // 当前布局类型
|
LayoutType LayoutType `json:"type"` // 当前布局类型
|
||||||
Table *LayoutTable `json:"table,omitempty"` // 表格布局
|
Table *LayoutTable `json:"table,omitempty"` // 表格布局
|
||||||
}
|
}
|
||||||
|
|
@ -144,15 +143,13 @@ const (
|
||||||
|
|
||||||
func NewView() *View {
|
func NewView() *View {
|
||||||
name := "Table"
|
name := "Table"
|
||||||
layoutID := ast.NewNodeID()
|
|
||||||
return &View{
|
return &View{
|
||||||
ID: ast.NewNodeID(),
|
ID: ast.NewNodeID(),
|
||||||
Name: name,
|
Name: name,
|
||||||
LayoutID: layoutID,
|
|
||||||
LayoutType: LayoutTypeTable,
|
LayoutType: LayoutTypeTable,
|
||||||
Table: &LayoutTable{
|
Table: &LayoutTable{
|
||||||
Spec: 0,
|
Spec: 0,
|
||||||
ID: layoutID,
|
ID: ast.NewNodeID(),
|
||||||
Filters: []*ViewFilter{},
|
Filters: []*ViewFilter{},
|
||||||
Sorts: []*ViewSort{},
|
Sorts: []*ViewSort{},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue