当前位置:网站首页>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
边栏推荐
- 28: Chapter 3: develop Passport Service: 11: define attributes in the configuration file, and then obtain them in the code;
- Go: send the get request and parse the return JSON (go1.16.4)
- [technology development-24]: characteristics of existing IOT communication technology
- Mysql:insert date:SQL 错误 [1292] [22001]: Data truncation: Incorrect date value:
- Dynamic programming 01 knapsack and complete knapsack
- 如何使用lxml判断网站公告是否更新
- Metal organic framework (MOFs) antitumor drug carrier | pcn-223 loaded with metronidazole | uio-66 loaded with ciprofloxacin hydrochloride( Global event bus
- Flutter dynamic | fair 2.5.0 new version features
- 【BW16 应用篇】安信可BW16模组与开发板更新固件烧录说明
猜你喜欢
Complete DNN deep neural network CNN training with tensorflow to complete image recognition cases
Qt学习19 Qt 中的标准对话框(上)
Use vscode to view hex or UTF-8 codes
FPGA测试方法以Mentor工具为例
Summary of common error reporting problems and positioning methods of thrift
Golang — 命令行工具cobra
The solution of Chinese font garbled code in keil5
[email protected])|制备路线"/>
叶酸修饰的金属-有机骨架(ZIF-8)载黄芩苷|金属有机骨架复合磁性材料([email protected])|制备路线
GoLand 2021.2 configure go (go1.17.6)
Message subscription and publishing
随机推荐
windos 创建cordova 提示 因为在此系统上禁止运行脚本
Function calling convention
[technology development-24]: characteristics of existing IOT communication technology
MySQL 数据增删改查综合案例
Go language web development series 25: Gin framework: using MD5 to verify the signature for the interface station
Qt学习22 布局管理器(一)
Flutter dynamic | fair 2.5.0 new version features
QT learning 22 layout manager (I)
[bw16 application] instructions for firmware burning of Anxin Ke bw16 module and development board update
Metal organic framework material zif-8 containing curcumin( [email protected] Nanoparticles) | nano metal organic framework carry
Uniapp skills - scrolling components -1
Depth and breadth first traversal of tree (regardless of binary tree)
交联环糊精金属有机骨架负载甲氨蝶呤缓释微粒|金属-有机多孔材料UiO-66负载黄酮苷类药物|齐岳
Go 1.16.4: purpose of go mod tidy
[développement technologique - 24]: caractéristiques des technologies de communication Internet des objets existantes
Sequence table (implemented in C language)
Redis:字符串类型数据的操作命令
QT learning 19 standard dialog box in QT (top)
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
Similarities and differences of sessionstorage, localstorage and cookies