tree

package
v2.0.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArcoDesignTree

type ArcoDesignTree struct {
	Items []*ArcoDesignTreeNode `json:"items"`
}

func NewArcoDesignTree

func NewArcoDesignTree() *ArcoDesignTree

func (*ArcoDesignTree) Add

func (s *ArcoDesignTree) Add(item *ArcoDesignTreeNode)

func (*ArcoDesignTree) ForEatch

func (s *ArcoDesignTree) ForEatch(fn func(*ArcoDesignTreeNode))

func (*ArcoDesignTree) GetOrCreateTreeByRootKey

func (s *ArcoDesignTree) GetOrCreateTreeByRootKey(
	key, title, nodeType string) *ArcoDesignTreeNode

type ArcoDesignTreeNode

type ArcoDesignTreeNode struct {
	// 该节点显示的标题
	Title string `json:"title"`
	// 唯一标示
	Key string `json:"key"`
	// 是否禁用节点
	Disabled bool `json:"disabled"`
	// 是否展示
	IsShow bool `json:"is_show"`
	// 是否是叶子节点。动态加载时有效
	IsLeaf bool `json:"is_leaf"`
	// 节点类型
	Type string `json:"type"`
	// 其他扩展属性
	Extra map[string]string `json:"extra"`
	// 其他扩展属性
	Labels map[string]string `json:"label"`
	// 子节点
	Children []*ArcoDesignTreeNode `json:"children"`
}

https://arco.design/vue/component/tree#API

func NewArcoDesignTreeNode

func NewArcoDesignTreeNode(key, title, nodeType string) *ArcoDesignTreeNode

func (*ArcoDesignTreeNode) Add

func (t *ArcoDesignTreeNode) Add(item *ArcoDesignTreeNode)

func (*ArcoDesignTreeNode) GetOrCreateChildrenByKey

func (t *ArcoDesignTreeNode) GetOrCreateChildrenByKey(
	key, title, nodeType string) *ArcoDesignTreeNode

func (*ArcoDesignTreeNode) SetTitle

func (t *ArcoDesignTreeNode) SetTitle(title string)

func (*ArcoDesignTreeNode) Walk

func (t *ArcoDesignTreeNode) Walk(fn func(*ArcoDesignTreeNode))

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL