mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
64c7f5b89a
4 changed files with 14 additions and 1 deletions
|
@ -190,6 +190,12 @@ type View struct {
|
|||
LayoutType LayoutType `json:"type"` // 当前布局类型
|
||||
Table *LayoutTable `json:"table,omitempty"` // 表格布局
|
||||
Gallery *LayoutGallery `json:"gallery,omitempty"` // 画廊布局
|
||||
|
||||
Groups []*View `json:"groups,omitempty"` // 分组视图列表
|
||||
GroupCalcSum bool `json:"groupCalcSum,omitempty"` // 分组是否计算总和
|
||||
GroupName string `json:"groupName,omitempty"` // 分组名称
|
||||
GroupFolded bool `json:"groupFolded,omitempty"` // 分组是否折叠
|
||||
GroupHidden bool `json:"groupHidden,omitempty"` // 分组是否隐藏
|
||||
}
|
||||
|
||||
// LayoutType 描述了视图布局类型。
|
||||
|
@ -577,7 +583,6 @@ func (av *AttributeView) Clone() (ret *AttributeView) {
|
|||
|
||||
for _, view := range ret.Views {
|
||||
view.ID = ast.NewNodeID()
|
||||
view.Table.ID = ast.NewNodeID()
|
||||
|
||||
for _, f := range view.Filters {
|
||||
f.Column = keyIDMap[f.Column]
|
||||
|
@ -592,11 +597,13 @@ func (av *AttributeView) Clone() (ret *AttributeView) {
|
|||
|
||||
switch view.LayoutType {
|
||||
case LayoutTypeTable:
|
||||
view.Table.ID = ast.NewNodeID()
|
||||
for _, column := range view.Table.Columns {
|
||||
column.ID = keyIDMap[column.ID]
|
||||
}
|
||||
view.Table.RowIDs = []string{}
|
||||
case LayoutTypeGallery:
|
||||
view.Gallery.ID = ast.NewNodeID()
|
||||
for _, cardField := range view.Gallery.CardFields {
|
||||
cardField.ID = keyIDMap[cardField.ID]
|
||||
}
|
||||
|
|
|
@ -64,6 +64,8 @@ type BaseInstance struct {
|
|||
PageSize int `json:"pageSize"` // 每页项目数
|
||||
ShowIcon bool `json:"showIcon"` // 是否显示字段图标
|
||||
WrapField bool `json:"wrapField"` // 是否换行字段内容
|
||||
Folded bool `json:"folded,omitempty"` // 是否折叠
|
||||
Hidden bool `json:"hidden,omitempty"` // 是否隐藏
|
||||
}
|
||||
|
||||
func (baseInstance *BaseInstance) GetSorts() []*ViewSort {
|
||||
|
|
|
@ -97,6 +97,8 @@ type Gallery struct {
|
|||
Fields []*GalleryField `json:"fields"` // 画廊字段
|
||||
Cards []*GalleryCard `json:"cards"` // 画廊卡片
|
||||
CardCount int `json:"cardCount"` // 画廊总卡片数
|
||||
|
||||
Groups []*Gallery `json:"groups,omitempty"` // 分组实例列表
|
||||
}
|
||||
|
||||
// GalleryCard 描述了画廊实例卡片的结构。
|
||||
|
|
|
@ -58,6 +58,8 @@ type Table struct {
|
|||
Columns []*TableColumn `json:"columns"` // 表格列
|
||||
Rows []*TableRow `json:"rows"` // 表格行
|
||||
RowCount int `json:"rowCount"` // 表格总行数
|
||||
|
||||
Groups []*Table `json:"groups,omitempty"` // 分组实例列表
|
||||
}
|
||||
|
||||
// TableColumn 描述了表格实例列的结构。
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue