index.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <template>
  2. <div class="card content-box">
  3. <span class="text"> 引导页 🍓🍇🍈🍉</span>
  4. <el-alert
  5. title="引导页对于一些第一次进入项目的人很有用,你可以简单介绍下项目的功能。本 Demo 是基于 driver.js."
  6. type="warning"
  7. :closable="false"
  8. />
  9. <div id="Bee">
  10. <el-button type="primary" @click.prevent.stop="driverObj.drive()"> 打开引导页 🤹‍♂️ </el-button>
  11. </div>
  12. </div>
  13. </template>
  14. <script setup lang="ts" name="guide">
  15. import { driver } from "driver.js";
  16. import "driver.js/dist/driver.css";
  17. const driverObj = driver({
  18. allowClose: true,
  19. doneBtnText: "结束",
  20. nextBtnText: "下一步",
  21. prevBtnText: "上一步",
  22. steps: [
  23. {
  24. element: "#collapseIcon",
  25. popover: {
  26. title: "Collapse Icon",
  27. description: "Open && Close sidebar",
  28. side: "right"
  29. }
  30. },
  31. {
  32. element: "#breadcrumb",
  33. popover: {
  34. title: "Breadcrumb",
  35. description: "Indicate the current page location",
  36. side: "right"
  37. }
  38. },
  39. {
  40. element: "#assemblySize",
  41. popover: {
  42. title: "Switch Assembly Size",
  43. description: "Switch the system size",
  44. side: "left"
  45. }
  46. },
  47. {
  48. element: "#language",
  49. popover: {
  50. title: "Switch Language",
  51. description: "Switch the system language",
  52. side: "left"
  53. }
  54. },
  55. {
  56. element: "#searchMenu",
  57. popover: {
  58. title: "Page Search",
  59. description: "Page search, quick navigation",
  60. side: "left"
  61. }
  62. },
  63. {
  64. element: "#themeSetting",
  65. popover: {
  66. title: "Setting theme",
  67. description: "Customize settings theme",
  68. side: "left"
  69. }
  70. },
  71. {
  72. element: "#message",
  73. popover: {
  74. title: "Message Notification",
  75. description: "Can receive company information",
  76. side: "left"
  77. }
  78. },
  79. {
  80. element: "#fullscreen",
  81. popover: {
  82. title: "Full Screen",
  83. description: "Full Screen, Exit The Full Screen Page",
  84. side: "left"
  85. }
  86. }
  87. ]
  88. });
  89. </script>
  90. <style scoped lang="scss">
  91. @use "./index" as *;
  92. </style>