|
|
@@ -16,38 +16,33 @@ import { useOverflow } from '@/hooks/useOverflow'
|
|
|
import { formatTimezone } from '@/utils/tools'
|
|
|
import { useThemeStore } from '@/stores/modules/theme'
|
|
|
import ShareLinkDialog from './components/ShareLinkDialog.vue'
|
|
|
+import { useDriver } from '@/utils/driverGuide'
|
|
|
|
|
|
-import { driver } from 'driver.js'
|
|
|
+// import { driver } from 'driver.js'
|
|
|
|
|
|
-const driverObj = driver({
|
|
|
- showProgress: true,
|
|
|
- progressText: 'Step {{current}} of {{total}}',
|
|
|
- stagePadding: 2,
|
|
|
- showButtons: ['next', 'previous'],
|
|
|
- steps: [
|
|
|
- {
|
|
|
- element: '#step-home-1',
|
|
|
- popover: {
|
|
|
- title: 'Animated Tour Example',
|
|
|
- description: "Here is the code example showing animated tour. Let's walk you through it.",
|
|
|
- side: 'left',
|
|
|
- align: 'start'
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- element: '#step-home-2',
|
|
|
- popover: {
|
|
|
- title: 'Import the Library',
|
|
|
- description: 'It works the same in vanilla JavaScript as well as frameworks.',
|
|
|
- side: 'bottom',
|
|
|
- align: 'start'
|
|
|
- }
|
|
|
+const steps: any = [
|
|
|
+ {
|
|
|
+ element: '#step-home-1',
|
|
|
+ popover: {
|
|
|
+ title: 'Animated Tour Example',
|
|
|
+ description: "Here is the code example showing animated tour. Let's walk you through it.",
|
|
|
+ side: 'left',
|
|
|
+ align: 'start'
|
|
|
}
|
|
|
- ]
|
|
|
-})
|
|
|
-
|
|
|
-const test = () => {
|
|
|
- driverObj.drive()
|
|
|
+ },
|
|
|
+ {
|
|
|
+ element: '#step-home-2',
|
|
|
+ popover: {
|
|
|
+ title: 'Import the Library',
|
|
|
+ description: 'It works the same in vanilla JavaScript as well as frameworks.',
|
|
|
+ side: 'bottom',
|
|
|
+ align: 'start'
|
|
|
+ }
|
|
|
+ }
|
|
|
+]
|
|
|
+const { start } = useDriver(steps)
|
|
|
+const handleGuide = () => {
|
|
|
+ start() // 开始引导
|
|
|
}
|
|
|
|
|
|
const route = useRoute()
|
|
|
@@ -169,6 +164,12 @@ const openShareDialog = () => {
|
|
|
<VTag large :type="allData?.transportInfo?.status">{{
|
|
|
allData?.transportInfo?.status
|
|
|
}}</VTag>
|
|
|
+ <el-button style="height: 24px; margin-left: 8px" class="driver-guide-btn el-button--dark">
|
|
|
+ <span class="font_family icon-icon_guidelines_b"></span>
|
|
|
+ <span style="display: inline-block; margin-top: 2px; margin-left: 4px; font-size: 12px">
|
|
|
+ Guidelines
|
|
|
+ </span>
|
|
|
+ </el-button>
|
|
|
<div class="right-operation" id="step-home-1">
|
|
|
<el-button
|
|
|
v-if="
|
|
|
@@ -181,7 +182,7 @@ const openShareDialog = () => {
|
|
|
<span class="font_family icon-icon_log_b" style="margin-right: 4px"></span
|
|
|
>AMS/ISF</el-button
|
|
|
>
|
|
|
- <el-button @click="test">测试</el-button>
|
|
|
+ <el-button @click="handleGuide">测试</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="detail-info" id="step-home-2">
|