Skip to content

文章右侧目录的写法 #15

@axuebin

Description

@axuebin
  1. 正则获取一个没有层级的顺序数组
  2. 构建带有层级关系的对象数组
  3. 构建DOM元素,也就是ul、li列表

觉得现在这种方式,特别是我的写法很丑,有待改进。

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions