This commit is contained in:
Daniel 2025-06-12 22:21:07 +08:00
parent 67370745b2
commit d05010a71f
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
5 changed files with 73 additions and 25 deletions

View file

@ -91,16 +91,6 @@ type TableCell struct {
BgColor string `json:"bgColor"` // 单元格背景颜色
}
func (row *TableRow) GetValue(keyID string) (ret *Value) {
for _, cell := range row.Cells {
if nil != cell.Value && keyID == cell.Value.KeyID {
ret = cell.Value
break
}
}
return
}
func (table *Table) GetColumn(id string) *TableColumn {
for _, column := range table.Columns {
if column.ID == id {
@ -134,6 +124,16 @@ func (row *TableRow) GetValues() (ret []*Value) {
return
}
func (row *TableRow) GetValue(keyID string) (ret *Value) {
for _, cell := range row.Cells {
if nil != cell.Value && keyID == cell.Value.KeyID {
ret = cell.Value
break
}
}
return
}
func (table *Table) GetItems() (ret []Item) {
ret = []Item{}
for _, row := range table.Rows {