快速了解
完整资料
资料已展开关于 Driver
一个轻量级(约4kb gzipped)但强大的 JavaScript 引擎,可以帮助您驱动用户对页面的关注,兼容所有的主流浏览器,可以用于任何您的覆盖需要
特色功能:
- 突出显示页面上的任何任何项目
- 锁定用户交互
- 创建功能介绍
- 为用户添加聚焦器
- 高度可定制 – 可在任何地方使用,可覆盖
- 界面友好 – 可通过按键控制
- 轻量级 – gzip 压缩后只有约4kb
- 在所有主流浏览器中保持一致的行为
- 免费用于个人和商业用途
示列

参考
html
复制代码
<script>
import Driver from "driver.js" // import driver.js
import "driver.js/dist/driver.min.css" // import driver.js css
import steps from "../vendor/guide"
export default {
name: "Guide",
data () {
return {
driver: null
}
},
mounted () {
this.driver = new Driver({
className: "scoped-class", // className to wrap driver.js popover
animate: true, // Animate while changing highlighted element
opacity: 0.75, // Background opacity (0 means only popovers and without overlay)
padding: 10, // Distance of element from around the edges
allowClose: true, // Whether clicking on overlay should close or not
overlayClickNext: false, // Should it move to next step on overlay click
doneBtnText: "完成", // Text on the final button
closeBtnText: "关闭", // Text on the close button for this step
nextBtnText: "下一步", // Next button text for this step
prevBtnText: "上一步" // Previous button text for this step
// Called when moving to next step on any step
})
// this.driver = new Driver()
},
methods: {
guide () {
this.driver.defineSteps(steps)
this.driver.start()
}
}
}
</script>
适合的使用方向
特色功能:
一个轻量级(约4kb gzipped)但强大的 JavaScript 引擎,可以帮助您驱动用户对页面的关注,兼容所有的主流浏览器,可以用于任何您的覆盖需要
主要用途
一个轻量级(约4kb gzipped)但强大的 JavaScript 引擎,可以帮助您驱动用户对页面的关注,兼容所有的主流浏览器,可以用于任何您的覆盖需要
适用方向
适合编码、调试、测试、接口联调和工程效率提升等开发场景。
收录线索
引导API / 云服务
资料说明
内容根据公开资料整理;版本、兼容性与服务状态请以官网最新说明为准。
