当前位置:网站首页>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
边栏推荐
- Common network state detection and analysis tools
- Example analysis of QT learning 18 login dialog box
- Go language web development series 26: Gin framework: demonstrates the execution sequence of code when there are multiple middleware
- 树的深入和广度优先遍历(不考虑二叉树)
- 解决MySql 1045 Access denied for user ‘root‘@‘localhost‘ (using password: YES)
- Leetcode-1175. Prime Arrangements
- Failure of vector insertion element iterator in STL
- 使用vscode查看Hex或UTF-8编码
- 金属有机骨架MIL-88负载阿霉素DOX|叶酸修饰UiO-66-NH2负载阿霉素[email protected]纳米粒子
- Using registered classes to realize specific type matching function template
猜你喜欢
Qt学习19 Qt 中的标准对话框(上)
Go language web development series 26: Gin framework: demonstrates the execution sequence of code when there are multiple middleware
Qt学习24 布局管理器(三)
Uio-66-cooh loaded bendamostine | hydroxyapatite (HA) coated MIL-53 (FE) nanoparticles | baicalin loaded manganese based metal organic skeleton material
可编程逻辑器件软件测试
MySQL data processing value addition, deletion and modification
Summary of common error reporting problems and positioning methods of thrift
Go language web development series 27: Gin framework: using gin swagger to implement interface documents
又一个行业被中国芯片打破空白,难怪美国模拟芯片龙头降价抛售了
Qt学习18 登录对话框实例分析
随机推荐
JVM object lifecycle
QT learning 21 standard dialog box in QT (Part 2)
金属有机骨架MOFs装载非甾体类抗炎药物|ZIF-8包裹普鲁士蓝负载槲皮素(制备方法)
Common network state detection and analysis tools
QT learning 17 dialog box and its types
SQL Injection (GET/Search)
Cross linked cyclodextrin metal organic framework loaded methotrexate slow-release particles | metal organic porous material uio-66 loaded with flavonoid glycosides | Qiyue
QT learning 22 layout manager (I)
PHP maze game
JVM runtime data area
UiO-66-COOH装载苯达莫司汀|羟基磷灰石( HA) 包裹MIL-53(Fe)纳米粒子|装载黄芩苷锰基金属有机骨架材料
Golang - command line tool Cobra
selenium 浏览器(1)
Use docker to build sqli lab environment and upload labs environment, and the operation steps are provided with screenshots.
[技术发展-24]:现有物联网通信技术特点
可编程逻辑器件软件测试
Redis:字符串类型数据的操作命令
Complete DNN deep neural network CNN training with tensorflow to complete image recognition cases
FPGA测试方法以Mentor工具为例
MySQL data processing value addition, deletion and modification