优化自动生成json #3

Merged
zhangdeman merged 24 commits from feature/tree into master 2023-05-05 16:10:39 +08:00
2 changed files with 27 additions and 0 deletions
efd9060fb8 增加node定义
白茶清欢
2023-03-28 18:17:43 +08:00
Commit 1 of 24
Show all commits

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
# 说明
基于JSON数据生成数据树
+24
View 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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.