先上图,看下实际效果:


step1:先安装driver插件,npm install driver.js
step2:在main.js文件中引入,这样就可以全局使用,也可以仅在当前使用页面中引入。我这里采用的是在main.js文件中引入,代码如下:


step3:新建一个step.js文件,专门放提示框里的内容。

step4:在使用该引导提示的vue页面引入方法。注意:给需要步骤提示加入id ,并且命名要与 step.js文件中的element对应的值名称保持一致。


这样就可以实现最开始的截图效果啦~
网友评论