增加node定义
This commit is contained in:
3
tree/REDME.md
Normal file
3
tree/REDME.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# 说明
|
||||||
|
|
||||||
|
基于JSON数据生成数据树
|
24
tree/node.go
Normal file
24
tree/node.go
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
// Package tree ...
|
||||||
|
//
|
||||||
|
// Description : tree ...
|
||||||
|
//
|
||||||
|
// Author : go_developer@163.com<白茶清欢>
|
||||||
|
//
|
||||||
|
// Date : 2023-03-28 18:12
|
||||||
|
package tree
|
||||||
|
|
||||||
|
// Node 节点的数据结构
|
||||||
|
//
|
||||||
|
// Author : go_developer@163.com<白茶清欢>
|
||||||
|
//
|
||||||
|
// Date : 18:12 2023/3/28
|
||||||
|
type Node struct {
|
||||||
|
Value interface{} // 节点的值
|
||||||
|
ValueType string // 数据类型 int64 / float64 / map / list / nil
|
||||||
|
Key string // 节点的key名称(输入的原始名称)
|
||||||
|
Show bool // 节点是否可见
|
||||||
|
ShowKey string // 重新序列化后, 对外输出的Key
|
||||||
|
AllowEdit bool // 当前key是否允许编辑
|
||||||
|
AllowChangeType bool // 在允许编辑的情况下, 是否允许修改数据类型
|
||||||
|
DefaultValue interface{} // 输入为value为nil时候的默认值
|
||||||
|
}
|
Reference in New Issue
Block a user