File tree Expand file tree Collapse file tree 4 files changed +50
-50
lines changed Expand file tree Collapse file tree 4 files changed +50
-50
lines changed Original file line number Diff line number Diff line change 44
44
"crypto-js" : " ^4.2.0" ,
45
45
"dayjs" : " ^1.11.10" ,
46
46
"diagram-js" : " ^12.6.0" ,
47
+ "driver.js" : " ^1.3.0" ,
47
48
"echarts" : " ^5.4.3" ,
48
49
"echarts-wordcloud" : " ^2.1.0" ,
49
50
"element-plus" : " 2.4.1" ,
50
51
"fast-xml-parser" : " ^4.3.2" ,
51
52
"highlight.js" : " ^11.9.0" ,
52
- "intro.js" : " ^7.2.0" ,
53
53
"jsencrypt" : " ^3.3.2" ,
54
54
"lodash-es" : " ^4.17.21" ,
55
55
"min-dash" : " ^4.1.1" ,
77
77
"@iconify/json" : " ^2.2.135" ,
78
78
"@intlify/unplugin-vue-i18n" : " ^1.4.0" ,
79
79
"@purge-icons/generated" : " ^0.9.0" ,
80
- "@types/intro.js" : " ^5.1.3" ,
81
80
"@types/lodash-es" : " ^4.17.10" ,
82
81
"@types/node" : " ^20.8.9" ,
83
82
"@types/nprogress" : " ^0.2.2" ,
Original file line number Diff line number Diff line change
1
+ import { Config , driver } from 'driver.js'
2
+ import 'driver.js/dist/driver.css'
3
+ import { useDesign } from '@/hooks/web/useDesign'
4
+ import { useI18n } from '@/hooks/web/useI18n'
5
+
6
+ const { t } = useI18n ( )
7
+
8
+ const { variables } = useDesign ( )
9
+
10
+ export const useGuide = ( options ?: Config ) => {
11
+ const driverObj = driver (
12
+ options || {
13
+ showProgress : true ,
14
+ nextBtnText : t ( 'common.nextLabel' ) ,
15
+ prevBtnText : t ( 'common.prevLabel' ) ,
16
+ doneBtnText : t ( 'common.doneLabel' ) ,
17
+ steps : [
18
+ {
19
+ element : `#${ variables . namespace } -menu` ,
20
+ popover : {
21
+ title : t ( 'common.menu' ) ,
22
+ description : t ( 'common.menuDes' ) ,
23
+ side : 'right'
24
+ }
25
+ } ,
26
+ {
27
+ element : `#${ variables . namespace } -tool-header` ,
28
+ popover : {
29
+ title : t ( 'common.tool' ) ,
30
+ description : t ( 'common.toolDes' ) ,
31
+ side : 'left'
32
+ }
33
+ } ,
34
+ {
35
+ element : `#${ variables . namespace } -tags-view` ,
36
+ popover : {
37
+ title : t ( 'common.tagsView' ) ,
38
+ description : t ( 'common.tagsViewDes' ) ,
39
+ side : 'bottom'
40
+ }
41
+ }
42
+ ]
43
+ }
44
+ )
45
+
46
+ return {
47
+ ...driverObj
48
+ }
49
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 27
27
" @intlify/unplugin-vue-i18n/types" ,
28
28
" vite/client" ,
29
29
" element-plus/global" ,
30
- " @types/intro.js" ,
31
30
" @types/qrcode" ,
32
31
" vite-plugin-svg-icons/client"
33
32
],
You can’t perform that action at this time.
0 commit comments