|
@@ -97,6 +97,15 @@ const steps: any = [
|
|
|
`,
|
|
`,
|
|
|
side: 'bottom'
|
|
side: 'bottom'
|
|
|
}
|
|
}
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ element: '#page-guide-btn-guide',
|
|
|
|
|
+ popover: {
|
|
|
|
|
+ title: '',
|
|
|
|
|
+ description:
|
|
|
|
|
+ 'After closing, you can still click the "page guide" button to view the page guide of the current page.',
|
|
|
|
|
+ side: 'bottom'
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
|
|
|
|
@@ -105,7 +114,8 @@ const steps: any = [
|
|
|
// { selector: '#tab-filter-guide', tip: 'Select booking status. The default is all.' }
|
|
// { selector: '#tab-filter-guide', tip: 'Select booking status. The default is all.' }
|
|
|
// ]
|
|
// ]
|
|
|
|
|
|
|
|
-const { start, moveNext, movePrevious, destroy } = useDriver(steps, {
|
|
|
|
|
|
|
+const guideTimer = ref<ReturnType<typeof setTimeout> | null>(null)
|
|
|
|
|
+const { start, moveNext, movePrevious, destroy, hasNextStep, moveTo } = useDriver(steps, {
|
|
|
onNextClick: (element, step, options) => {
|
|
onNextClick: (element, step, options) => {
|
|
|
if (options?.state?.activeIndex === 1) {
|
|
if (options?.state?.activeIndex === 1) {
|
|
|
trackingGuideStore.isShowMoreFiltersGuidePhoto = true
|
|
trackingGuideStore.isShowMoreFiltersGuidePhoto = true
|
|
@@ -133,26 +143,49 @@ const { start, moveNext, movePrevious, destroy } = useDriver(steps, {
|
|
|
trackingGuideStore.isShowDownloadFileGuidePhoto = false
|
|
trackingGuideStore.isShowDownloadFileGuidePhoto = false
|
|
|
} else if (options?.state?.activeIndex === 5) {
|
|
} else if (options?.state?.activeIndex === 5) {
|
|
|
trackingGuideStore.isShowDownloadFileGuidePhoto = true
|
|
trackingGuideStore.isShowDownloadFileGuidePhoto = true
|
|
|
-
|
|
|
|
|
trackingGuideStore.isShowCustomizeColumnsGuidePhoto = false
|
|
trackingGuideStore.isShowCustomizeColumnsGuidePhoto = false
|
|
|
|
|
+ } else if (options?.state?.activeIndex === 6) {
|
|
|
|
|
+ trackingGuideStore.isShowCustomizeColumnsGuidePhoto = true
|
|
|
|
|
+ }
|
|
|
|
|
+ if (guideTimer.value) {
|
|
|
|
|
+ clearTimeout(guideTimer.value)
|
|
|
|
|
+ guideTimer.value = null
|
|
|
}
|
|
}
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
movePrevious() // 执行上一步
|
|
movePrevious() // 执行上一步
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ onHighlightStarted: () => {
|
|
|
|
|
+ if (!hasNextStep()) {
|
|
|
|
|
+ guideTimer.value = setTimeout(() => {
|
|
|
|
|
+ destroy()
|
|
|
|
|
+ }, 3000)
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
// 关闭导览时,隐藏所有图片
|
|
// 关闭导览时,隐藏所有图片
|
|
|
- onDestroyStarted: () => {
|
|
|
|
|
|
|
+ onDestroyStarted: (element, step, options) => {
|
|
|
trackingGuideStore.isShowFilterGuidePhoto = false
|
|
trackingGuideStore.isShowFilterGuidePhoto = false
|
|
|
-
|
|
|
|
|
trackingGuideStore.isShowMoreFiltersGuidePhoto = false
|
|
trackingGuideStore.isShowMoreFiltersGuidePhoto = false
|
|
|
-
|
|
|
|
|
trackingGuideStore.isShowDownloadFileGuidePhoto = false
|
|
trackingGuideStore.isShowDownloadFileGuidePhoto = false
|
|
|
-
|
|
|
|
|
trackingGuideStore.isShowCustomizeColumnsGuidePhoto = false
|
|
trackingGuideStore.isShowCustomizeColumnsGuidePhoto = false
|
|
|
|
|
+ if (hasNextStep()) {
|
|
|
|
|
+ moveTo(options.config.steps.length - 1)
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
// showExtraHighlights.value = false // 隐藏额外高亮
|
|
// showExtraHighlights.value = false // 隐藏额外高亮
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
destroy() // 销毁导览
|
|
destroy() // 销毁导览
|
|
|
}) // 确保在下一次DOM更新后执行销毁
|
|
}) // 确保在下一次DOM更新后执行销毁
|
|
|
|
|
+ },
|
|
|
|
|
+ onDestroyed: () => {
|
|
|
|
|
+ trackingGuideStore.isShowFilterGuidePhoto = false
|
|
|
|
|
+ trackingGuideStore.isShowMoreFiltersGuidePhoto = false
|
|
|
|
|
+ trackingGuideStore.isShowDownloadFileGuidePhoto = false
|
|
|
|
|
+ trackingGuideStore.isShowCustomizeColumnsGuidePhoto = false
|
|
|
|
|
+ if (guideTimer.value) {
|
|
|
|
|
+ clearTimeout(guideTimer.value)
|
|
|
|
|
+ guideTimer.value = null
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
const startGuide = () => {
|
|
const startGuide = () => {
|