index.vue 822 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <div class="app-container">
  3. <aside>
  4. The guide page is useful for some people who entered the project for the first time. You can briefly introduce the
  5. features of the project. Demo is based on
  6. <a href="https://github.com/kamranahmedse/driver.js" target="_blank">driver.js.</a>
  7. </aside>
  8. <el-button icon="el-icon-question" type="primary" @click.prevent.stop="guide">
  9. Show Guide
  10. </el-button>
  11. </div>
  12. </template>
  13. <script>
  14. import Driver from 'driver.js'
  15. import 'driver.js/dist/driver.min.css'
  16. import steps from './steps'
  17. export default {
  18. name: 'Guide',
  19. data() {
  20. return {
  21. driver: null
  22. }
  23. },
  24. mounted() {
  25. this.driver = new Driver()
  26. },
  27. methods: {
  28. guide() {
  29. this.driver.defineSteps(steps)
  30. this.driver.start()
  31. }
  32. }
  33. }
  34. </script>