当前位置:网站首页>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 
边栏推荐
- JVM runtime data area
- Screenshot of the operation steps of upload labs level 4-level 9
- 叶酸修饰的金属-有机骨架(ZIF-8)载黄芩苷|金属有机骨架复合磁性材料([email protected])|制备路线
- GoLand 2021.1: rename the go project
- Richview trvstyle liststyle list style (bullet number)
- JS download files through URL links
- RocksDB LRUCache
- PHP maze game
- windos 创建cordova 提示 因为在此系统上禁止运行脚本
- How to use lxml to judge whether the website announcement is updated
猜你喜欢
![Mysql:insert date:SQL 错误 [1292] [22001]: Data truncation: Incorrect date value:](/img/2f/33504391a661ecb63d42d75acf3a37.png)
Mysql:insert date:SQL 错误 [1292] [22001]: Data truncation: Incorrect date value:

NFT新的契机,多媒体NFT聚合平台OKALEIDO即将上线

Mastering the cypress command line options is the basis for truly mastering cypress

Qt学习19 Qt 中的标准对话框(上)

Global event bus

解决MySql 1045 Access denied for user ‘root‘@‘localhost‘ (using password: YES)

Dlopen() implements dynamic loading of third-party libraries

Use vscode to view hex or UTF-8 codes

可编程逻辑器件软件测试
![[développement technologique - 24]: caractéristiques des technologies de communication Internet des objets existantes](/img/f3/a219fe8e7438b8974d2226b4c3d4a4.png)
[développement technologique - 24]: caractéristiques des technologies de communication Internet des objets existantes
随机推荐
JS continues to explore...
【吉林大学】考研初试复试资料分享
Uniapp skills - dom display and hiding
Rasp implementation of PHP
GoLand 2021.2 configure go (go1.17.6)
JVM系列——概述,程序计数器day1-1
Installation impression notes
金属有机骨架材料ZIF-8包载姜黄素([email protected]纳米颗粒)|纳米金属有机框架搭载雷帕霉素|科研试剂
MIL-100( Fe) 包裹小分子阿司匹林形成[email protected](Fe)|甘草次酸修饰金属有机框架材料UiO-66-NH2(简称UiO-66-NH2-GA)
Mysql:insert date:SQL 错误 [1292] [22001]: Data truncation: Incorrect date value:
Solve MySQL 1045 access denied for user 'root' @ 'localhost' (using password: yes)
Golang — 命令行工具cobra
SQL Injection (AJAX/JSON/jQuery)
Using registered classes to realize specific type matching function template
Use vscode to view hex or UTF-8 codes
The small project (servlet+jsp+mysql+el+jstl) completes a servlet with login function, with the operation of adding, deleting, modifying and querying. Realize login authentication, prevent illegal log
核酸修饰的金属有机框架药物载体|PCN-223金属有机骨架包载Ad金刚烷|ZIF-8包裹阿霉素(DOX)
RocksDB LRUCache
Global event bus
Use and design of Muduo buffer class