mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 08:00:13 +01:00
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
e7914f99f6
commit
420dc79830
1 changed files with 8 additions and 0 deletions
|
|
@ -419,6 +419,14 @@ func (value *Value) SetValByType(typ KeyType, val interface{}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (value *Value) GetValByType(typ KeyType) (ret interface{}) {
|
func (value *Value) GetValByType(typ KeyType) (ret interface{}) {
|
||||||
|
// 单独处理汇总
|
||||||
|
if KeyTypeRollup == value.Type {
|
||||||
|
if 1 > len(value.Rollup.Contents) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return value.Rollup.Contents[0].GetValByType(typ)
|
||||||
|
}
|
||||||
|
|
||||||
switch typ {
|
switch typ {
|
||||||
case KeyTypeBlock:
|
case KeyTypeBlock:
|
||||||
return value.Block
|
return value.Block
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue