一、 实现效果图

二、实现过程

1. 组件结构如下

2. tree-nav.component.html

3. tree-nav.component.ts

4. emit.ts

5. tree-item.component.html(此次部分使用内联样式 主要是为了支持浏览器的打印功能)

6.tree-item.component.scss

7. tree-item.component.ts

8. 使用 组件

9. mock 数据

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐