mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-13 18:54:21 +01:00
🎨 Improve av https://github.com/siyuan-note/siyuan/issues/15499
This commit is contained in:
parent
8ca9f119d0
commit
a9c2ae7351
5 changed files with 35 additions and 0 deletions
|
|
@ -349,6 +349,10 @@ type Viewable interface {
|
|||
// SetGroupFolded 设置分组是否折叠。
|
||||
SetGroupFolded(folded bool)
|
||||
|
||||
// GetGroupHidden 获取分组是否隐藏。
|
||||
// hidden 0:显示,1:空白隐藏,2:手动隐藏
|
||||
GetGroupHidden() int
|
||||
|
||||
// SetGroupHidden 设置分组是否隐藏。
|
||||
// hidden 0:显示,1:空白隐藏,2:手动隐藏
|
||||
SetGroupHidden(hidden int)
|
||||
|
|
|
|||
|
|
@ -123,6 +123,10 @@ func (baseInstance *BaseInstance) SetGroupFolded(folded bool) {
|
|||
baseInstance.GroupFolded = folded
|
||||
}
|
||||
|
||||
func (baseInstance *BaseInstance) GetGroupHidden() int {
|
||||
return baseInstance.GroupHidden
|
||||
}
|
||||
|
||||
func (baseInstance *BaseInstance) SetGroupHidden(hidden int) {
|
||||
baseInstance.GroupHidden = hidden
|
||||
}
|
||||
|
|
@ -182,6 +186,9 @@ type Collection interface {
|
|||
// SetItems 设置集合中的项目。
|
||||
SetItems(items []Item)
|
||||
|
||||
// CountItems 返回集合中的项目数量。
|
||||
CountItems() int
|
||||
|
||||
// GetFields 返回集合的所有字段。
|
||||
GetFields() []Field
|
||||
|
||||
|
|
|
|||
|
|
@ -167,6 +167,10 @@ func (gallery *Gallery) SetItems(items []Item) {
|
|||
}
|
||||
}
|
||||
|
||||
func (gallery *Gallery) CountItems() int {
|
||||
return len(gallery.Cards)
|
||||
}
|
||||
|
||||
func (gallery *Gallery) GetFields() (ret []Field) {
|
||||
ret = []Field{}
|
||||
for _, field := range gallery.Fields {
|
||||
|
|
|
|||
|
|
@ -141,6 +141,10 @@ func (table *Table) SetItems(items []Item) {
|
|||
}
|
||||
}
|
||||
|
||||
func (table *Table) CountItems() int {
|
||||
return len(table.Rows)
|
||||
}
|
||||
|
||||
func (table *Table) GetFields() (ret []Field) {
|
||||
ret = []Field{}
|
||||
for _, column := range table.Columns {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue