当前位置:网站首页>Generate directories from web content
Generate directories from web content
2022-07-03 14:03:00 【starcpdk】
Download the installation command
npm install --save tocbot
After downloading dist Below the table of contents copy Go to your project directory
Then introduce the plug-in in the component css and js
In the component's mounted Add this code to the hook function
// Generate directory plug-in initialization
tocbot.init({
// Where to render the table of contents.
tocSelector: '.js-toc', // Where is the generated directory , Here we use css Choose
// Where to grab the headings to build the table of contents.
contentSelector: '.js-toc-content', // Where is the source of the generated directory , Is to generate directories for who
// Which headings to grab inside of the contentSelector element.
headingSelector: 'h1, h2, h3 , h4 , h5 , h6', // Can give several levels of titles generated
// For headings inside relative or absolute positioned containers within content.
hasInnerContainers: true,
});
Pay attention to my notes , Put the corresponding css Put the selector on its own div in
effect
边栏推荐
- Record 405 questions about bank callback post request
- Qt学习17 对话框及其类型
- Depth and breadth first traversal of tree (regardless of binary tree)
- 【吉林大学】考研初试复试资料分享
- 怎样删除对象的某个属性或⽅法
- 记录关于银行回调post请求405 问题
- 3D vision - 2 Introduction to pose estimation - openpose includes installation, compilation and use (single frame, real-time video)
- Flutter dynamic | fair 2.5.0 new version features
- Programmable logic device software testing
- Mastering the cypress command line options is the basis for truly mastering cypress
猜你喜欢
Use vscode to view hex or UTF-8 codes
jvm-类加载
JVM系列——概述,程序计数器day1-1
The solution of Chinese font garbled code in keil5
Failure of vector insertion element iterator in STL
[email"/>
Folic acid modified metal organic framework (zif-8) baicalin loaded metal organic framework composite magnetic material (AU- [email
[email protected])|制备路线"/>
叶酸修饰的金属-有机骨架(ZIF-8)载黄芩苷|金属有机骨架复合磁性材料([email protected])|制备路线
QT learning 25 layout manager (4)
GoLand 2021.1.1: configure the multi line display of the tab of the open file
Flutter dynamic | fair 2.5.0 new version features
随机推荐
JVM系列——概述,程序计数器day1-1
Qt学习18 登录对话框实例分析
JVM class loading
消息订阅与发布
Logback log sorting
Qt学习23 布局管理器(二)
信创产业现状、分析与预测
RichView TRVStyle ListStyle 列表样式(项目符号编号)
项目协作的进度如何推进| 社区征文
金属有机骨架MOFs装载非甾体类抗炎药物|ZIF-8包裹普鲁士蓝负载槲皮素(制备方法)
Using registered classes to realize specific type matching function template
Failure of vector insertion element iterator in STL
交联环糊精金属有机骨架负载甲氨蝶呤缓释微粒|金属-有机多孔材料UiO-66负载黄酮苷类药物|齐岳
Uniapp skills - dom display and hiding
Ocean CMS vulnerability - search php
Go language web development series 25: Gin framework: using MD5 to verify the signature for the interface station
Field problems in MySQL
[combinatorics] permutation and combination (two counting principles, examples of set permutation | examples of set permutation and circle permutation)
Uniapp tips - set background music
MySQL data processing value addition, deletion and modification