This commit is contained in:
Daniel 2025-07-05 12:11:12 +08:00
parent 2b753ac16f
commit 0341a1cb03
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
13 changed files with 2183 additions and 1939 deletions

View file

@ -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)
}