Tree

Basic usage:

With Checkboxes (default)
Simple

Tree Select Component

Props of Tree

AttributeDescriptionTypeAccepted ValuesDefault
configThe object that specifies from where to take label,icon,value,key.Object{labelKey: string, valueKey: string, iconKey?: string, filterBy?: string, filterLocale?: string, childrenKey?: string}{ valueKey: 'id',labelKey: 'label', iconKey: 'icon', childrenKey: 'children' }
default-checked-keysArray with Node KeysArray---[]
empty-textText displayed when data is voidString---No Data
expanded-keysTree state can be controlled programmatically with the expandedKeys property that defines the keys that are expandedObject{[key: string]: boolean}{}
filter-placeholderPlaceholder Text For Search InputString---
loadingis Loading valuebooleantrue | falsefalse
optionsArray of options (VcTreeNodeType[])Array---[]
returned-valueFor returned specific keys of objectString---
selectableWhether Tree Component is selectable (with checkboxes)Booleantrue | falsetrue
scroll-heightMax Height of tree list containerString | Number---undefined

Props of Tree Select

AttributeDescriptionTypeAccepted ValuesDefault
modelValueValue of the component.ArrayTreeNodeType[]undefined
classAdditional class for containerstring--
styleAdditional style for containerstring | object-null
tag-colorColor class for tagstringprimary | secondary | destructive | success | warningprimary
tag-borderlessWhether Tag with background (no border)Boolean-false
configThe object that specifies from where to take label,icon,value,key.Object{labelKey: string, valueKey: string, iconKey?: string, filterBy?: string, filterLocale?: string, childrenKey?: string}{ valueKey: 'id',labelKey: 'label', iconKey: 'icon', childrenKey: 'children' }
optionsArray of options (VcTreeNodeType[])Array---[]
returned-valueFor returned specific keys of objectString---
loadingis Loading valuebooleantrue | falsefalse
empty-textText displayed when data is voidString---No Data
tags-limitNumber of visible tagsNumber---3
scroll-heightMax Height of tree list containerString | Number---252

Tree Component Slots

NameDescription
node-labelNode Item Content

Tree Select Component Slots

NameDescription
option-labelNode Item Content

Events of Tree Component

MethodDescriptionParameters
node-collapseTriggers when current node closeNode Item
node-expandTriggers when current node openNode Item
node-selectTriggers when current node selectNode Item
node-unselectTriggers when current node unselectNode Item
update:expandedKeysTriggers when update expandedKeysexpandedKeys
update:selectedKeysTriggers when update selectedKeysselectedKeys

Events of Tree Select Component

MethodDescriptionParameters
update:modelValueTriggers when update modelValuemodelValue
on-changeTriggers when change value. If prop returnedValue will return Array of some returnedValue, else will returned Array with node objectsvalue