Ant-design-vue: DirectoryTree 无法自定义图标

Created on 13 Apr 2020  ·  4Comments  ·  Source: vueComponent/ant-design-vue

  • [ ] I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.5.1

Environment

Win10、Chrome 80.0.3987.163、Vue 2.6.10

Reproduction link

https://www.antdv.com/components/tree-cn/#components-tree-demo-directory

Steps to reproduce

1.树形元素加入插槽属性 slots: { icon: 'user' }
2.使用插槽

What is expected?

可以自定义图标

What is actually happening?

无法自定义图标

Most helpful comment

All 4 comments

请提供复现示例 谢谢

如果没解决的话,推荐你看一下我的这篇关于自定义 tree 组件自定义图标的博客 (https://blog.csdn.net/weixin_40567679/article/details/107693255) 哈哈
最后是 jsx + render function + scopedSlots 实现的

https://codesandbox.io/s/distracted-dawn-mn2md
@tangjinzhou

遇到了同样的问题,求解决

Was this page helpful?
0 / 5 - 0 ratings