当前位置:网站首页>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 
边栏推荐
- Logback log sorting
- Selenium browser (1)
- Golang — template
- Metal organic framework MOFs loaded with non steroidal anti-inflammatory drugs | zif-8 wrapped Prussian blue loaded quercetin (preparation method)
- QT learning 25 layout manager (4)
- PHP maze game
- Go language web development series 29: Gin framework uses gin contrib / sessions library to manage sessions (based on cookies)
- RichView TRVStyle ListStyle 列表样式(项目符号编号)
- Golang — template
- Go language web development series 25: Gin framework: using MD5 to verify the signature for the interface station
猜你喜欢

28: Chapter 3: develop Passport Service: 11: define attributes in the configuration file, and then obtain them in the code;

Programmable logic device software testing

如何使用lxml判断网站公告是否更新

Go language web development series 29: Gin framework uses gin contrib / sessions library to manage sessions (based on cookies)

Logback log sorting

Installation impression notes

Comprehensive case of MySQL data addition, deletion, modification and query
[email protected])"/>金属有机骨架(MOFs)抗肿瘤药载体|PCN-223装载甲硝唑|UiO-66包载盐酸环丙沙星([email protected])

FPGA测试方法以Mentor工具为例

SQL Injection (AJAX/JSON/jQuery)
随机推荐
Spring cup eight school league
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
Which securities company has the lowest Commission for opening an account online? I want to open an account. Is it safe for the online account manager to open an account
Qt学习20 Qt 中的标准对话框(中)
Qt学习24 布局管理器(三)
Golang — 命令行工具cobra
解决MySql 1045 Access denied for user ‘root‘@‘localhost‘ (using password: YES)
JVM runtime data area
Go: send the get request and parse the return JSON (go1.16.4)
Ocean CMS vulnerability - search php
Qt学习25 布局管理器(四)
JVM family - overview, program counter day1-1
Qt学习17 对话框及其类型
[ACNOI2022]猜数
项目协作的进度如何推进| 社区征文
C language standard IO function sorting
Vite project commissioning
windos 创建cordova 提示 因为在此系统上禁止运行脚本
Uniapp skills - dom display and hiding
Leetcode-1175. Prime Arrangements