mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
docs(components): [tree-v2] add some disabled nodes (#13484)
* docs(components): [tree-v2] add some disabled nodes * docs(components): [tree-v2] add some disabled nodes
This commit is contained in:
parent
a5970049d5
commit
6256bde3a0
@ -6,6 +6,7 @@ interface Tree {
|
||||
id: string
|
||||
label: string
|
||||
children?: Tree[]
|
||||
disabled: boolean
|
||||
}
|
||||
|
||||
const getKey = (prefix: string, id: number) => {
|
||||
@ -32,6 +33,7 @@ const createData = (
|
||||
children: childrenNumber
|
||||
? createData(maxDeep, maxChildren, childrenNumber, deep + 1, nodeKey)
|
||||
: undefined,
|
||||
disabled: nodeKey.includes('2'),
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user