mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Database gallery view https://github.com/siyuan-note/siyuan/issues/10414
This commit is contained in:
parent
67370745b2
commit
d05010a71f
5 changed files with 73 additions and 25 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue