antd tree 的二次封装运用

278 阅读1分钟

记录一下:二次封装antd 的 tree组件 功能点 类似于 商城系统的多级选择物品的下拉树选项

image.png

代码片段中 treeData 就是数据的来源 结构是这样的: [{"name":"一级节点名称","key":"P142307070910539","phone":null,"scopedSlots":{"title":"title"},"children":[{"name":"二级节点名称","key":"142307070910552","phone":"","scopedSlots":{"title":"children"},children:{}}]