vue-蒙版引导-driver.js
1,driver.js新用户引导https://kamranahmed.info/driver.js/#single-element-no-popover模型大致如下图:2,代码如下:import Driver from 'driver.js' // import driver.jsimport 'driver.js/dist/driver.min.css' // import ...
·
1,driver.js 新用户引导
https://kamranahmed.info/driver.js/#single-element-no-popover
模型大致如下图:
2,代码如下:
import Driver from 'driver.js' // import driver.js
import 'driver.js/dist/driver.min.css' // import driver.js css
import steps from './defineSteps'
mounted() {
this.driver = new Driver({
//此处为api
animate: false,
opacity: 0.70,
allowClose: false,
doneBtnText: '',
closeBtnText: '',
nextBtnText: '',
prevBtnText: '',
onReset: (Element)=>{
//这里写逻辑回调
},
});
setTimeout(() => {
//添加延时器为了操作dom
this.guide();
},400)
},
methods: {
guide() {
this.driver.defineSteps(steps)
this.driver.start()
},
更多推荐
已为社区贡献1条内容
所有评论(0)