mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Database grouping by field https://github.com/siyuan-note/siyuan/issues/10964
This commit is contained in:
parent
2b753ac16f
commit
0341a1cb03
13 changed files with 2183 additions and 1939 deletions
|
|
@ -63,9 +63,8 @@ type Table struct {
|
|||
type TableColumn struct {
|
||||
*BaseInstanceField
|
||||
|
||||
Pin bool `json:"pin"` // 是否固定
|
||||
Width string `json:"width"` // 列宽度
|
||||
Calc *FieldCalc `json:"calc"` // 计算规则和结果
|
||||
Pin bool `json:"pin"` // 是否固定
|
||||
Width string `json:"width"` // 列宽度
|
||||
}
|
||||
|
||||
// TableRow 描述了表格实例行的结构。
|
||||
|
|
@ -150,18 +149,15 @@ func (table *Table) GetFields() (ret []Field) {
|
|||
return ret
|
||||
}
|
||||
|
||||
func (table *Table) GetField(id string) Field {
|
||||
for _, column := range table.Columns {
|
||||
if column.ID == id {
|
||||
return column
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (*Table) GetType() LayoutType {
|
||||
return LayoutTypeTable
|
||||
}
|
||||
|
||||
func (table *Table) GetID() string {
|
||||
return table.ID
|
||||
}
|
||||
|
||||
func (table *Table) Sort(attrView *AttributeView) {
|
||||
sort0(table, attrView)
|
||||
}
|
||||
|
||||
func (table *Table) Filter(attrView *AttributeView) {
|
||||
filter0(table, attrView)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue