Drive.js 的一些 Api 使用记录

devtools/2024/10/19 2:45:30/

文章目录

  • 2024 年 drive.js 的基础使用
  • 想在下一步的时候处理些逻辑呢?(同步)
  • Element 的各种选择器


2024 年 drive.js 的基础使用

安装就跳过了 npm install driver.js ,一行代码就可以搞定

官网的 Basic Usage

基础使用的截图如下:

在这里插入图片描述


想在下一步的时候处理些逻辑呢?(同步)

比方说我现在在第一步,点击下一步之前,我想处理些东西!
官网的 api 说明点我跳转

在这里插入图片描述


Element 的各种选择器

用法跟 document.querySelector() 很类似啊

我觉的比较有用的是这个 a标签 的选择器,因为需求会比较多吧,官网的 api 点我
在这里插入图片描述

javascript">import { driver } from "driver.js";
import "driver.js/dist/driver.css";const driverObj = driver({showProgress: true,steps: [{ element: '#tour-example', popover: { title: 'Animated Tour Example', description: 'Here is the code example showing animated tour. Let\'s walk you through it.', side: "left", align: 'start' }},{ element: 'code .line:nth-child(1)', popover: { title: 'Import the Library', description: 'It works the same in vanilla JavaScript as well as frameworks.', side: "bottom", align: 'start' }},{ element: 'code .line:nth-child(2)', popover: { title: 'Importing CSS', description: 'Import the CSS which gives you the default styling for popover and overlay.', side: "bottom", align: 'start' }},{ element: 'code .line:nth-child(4) span:nth-child(7)', popover: { title: 'Create Driver', description: 'Simply call the driver function to create a driver.js instance', side: "left", align: 'start' }},{ element: 'code .line:nth-child(18)', popover: { title: 'Start Tour', description: 'Call the drive method to start the tour and your tour will be started.', side: "top", align: 'start' }},{ element: 'a[href="/docs/configuration"]', popover: { title: 'More Configuration', description: 'Look at this page for all the configuration options you can pass.', side: "right", align: 'start' }},{ popover: { title: 'Happy Coding', description: 'And that is all, go ahead and start adding tours to your applications.' } }]
});driverObj.drive();

http://www.ppmy.cn/devtools/117758.html

相关文章

【OSS安全最佳实践】对OSS表格文件中的敏感数据进行脱敏

使用数据安全中心 DSC(Data Security Center)的静态脱敏,对当前账号下源OSS Bucket中的结构化TXT、CSV、XLSX和XLS格式文件中的敏感数据进行脱敏,然后将脱敏后的文件保存到当前账号下的目标OSS Bucket,实现数据的安全共…

【洛谷】P4551 最长异或路径 的题解

【洛谷】P4551 最长异或路径 的题解 洛谷传送门 题解 神奇的字典树咩呀qaq 看到异或,我们首先很容易想到 trie 树 还有 线性基。但是这题明显是字典树。 指定一个根 r o o t root root,用 t r i e [ u ] [ v ] trie[u][v] trie[u][v] 表示 u u u…

【编程基础知识】Cookie、Session和JWT(JSON Web Token)

引言 在无状态的HTTP协议下,状态管理对于Web应用程序至关重要。Cookie、Session和JWT(JSON Web Token)是三种主流的状态管理方案,它们允许客户端与服务器之间保持状态。 一、Cookie 1. 定义 Cookie:服务器发送到客…

es由一个集群迁移到另外一个集群es的数据迁移

迁移es的数据 改下index的索引 就可以了。 查询 用curl -u就可以查询了

webpack4 target:“electron-renderer“ 打包加速配置

背景 昨天写得一篇Electron-vue asar 局部打包优化处理方案——绕开每次npm run build 超级慢的打包问题-CSDN博客文章浏览阅读754次,点赞19次,收藏11次。因为组员对于 Electron 打包过程存在比较迷糊的状态,且自己也没主动探索 Electron-vu…

六、设计模式-6.3、责任链模式

6.3、责任链模式 6.3.1、什么是责任链模式? 答: 责任链模式(Chain of Responsibility Pattern)是一种行为型设计模式,用于将请求的发送者和接收者解耦,将多个对象组成一条链,并在链上传递请求…

微信小程序05-常用API下

零、文章目录 微信小程序05-常用API下 1、案例:罗盘动画 (1)案例分析 需求:在微信小程序中,开发者根据项目需求,可以在页面中添加一些动画效果,例如旋转、缩放、移动等,通过这些动…

【Elasticsearch系列廿二】特殊参数

💝💝💝欢迎来到我的博客,很高兴能够在这里和您见面!希望您在这里可以感受到一份轻松愉快的氛围,不仅可以获得有趣的内容和知识,也可以畅所欲言、分享您的想法和见解。 推荐:kwan 的首页,持续学…