-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
可以在树形组件的 props 中添加自定义节点属性,支持 vnode,或者在插槽中添加也可以的
What does the proposed API look like?
<template>
<a-tree
:render-node="myRender"
:tree-data="xxx" >
</a-tree>
</template>
<script>
export default {
setup () {
// xxxx 为 此节点的属性
function myRender (xxxx) {
let { x1 , x2 , x3 }=xxxx
if (x1==='apple') {
retuen ......
} else {
retuen ......
}
}
return { myRender }
}
}
</script>
```t>