mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-02-03 02:54:40 +08:00
feat(demo): use Tour component replace dirverjs (#3777)
* feat(demo): use Tour component replace dirverjs * chore(deps): remove dirverjs package
This commit is contained in:
parent
0ffd777e54
commit
49c4dc646a
@ -83,7 +83,6 @@
|
|||||||
"cropperjs": "^1.6.1",
|
"cropperjs": "^1.6.1",
|
||||||
"crypto-js": "^4.2.0",
|
"crypto-js": "^4.2.0",
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
"driver.js": "^1.3.1",
|
|
||||||
"echarts": "^5.5.0",
|
"echarts": "^5.5.0",
|
||||||
"exceljs": "^4.4.0",
|
"exceljs": "^4.4.0",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
|
12
pnpm-lock.yaml
generated
12
pnpm-lock.yaml
generated
@ -50,9 +50,6 @@ importers:
|
|||||||
dayjs:
|
dayjs:
|
||||||
specifier: ^1.11.10
|
specifier: ^1.11.10
|
||||||
version: 1.11.10
|
version: 1.11.10
|
||||||
driver.js:
|
|
||||||
specifier: ^1.3.1
|
|
||||||
version: 1.3.1
|
|
||||||
echarts:
|
echarts:
|
||||||
specifier: ^5.5.0
|
specifier: ^5.5.0
|
||||||
version: 5.5.0
|
version: 5.5.0
|
||||||
@ -3108,9 +3105,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==}
|
resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==}
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=12'}
|
||||||
|
|
||||||
driver.js@1.3.1:
|
|
||||||
resolution: {integrity: sha512-MvUdXbqSgEsgS/H9KyWb5Rxy0aE6BhOVT4cssi2x2XjmXea6qQfgdx32XKVLLSqTaIw7q/uxU5Xl3NV7+cN6FQ==}
|
|
||||||
|
|
||||||
duplexer2@0.1.4:
|
duplexer2@0.1.4:
|
||||||
resolution: {integrity: sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==}
|
resolution: {integrity: sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==}
|
||||||
|
|
||||||
@ -9402,7 +9396,7 @@ snapshots:
|
|||||||
|
|
||||||
axios@1.6.8:
|
axios@1.6.8:
|
||||||
dependencies:
|
dependencies:
|
||||||
follow-redirects: 1.15.6(debug@4.3.4)
|
follow-redirects: 1.15.6
|
||||||
form-data: 4.0.0
|
form-data: 4.0.0
|
||||||
proxy-from-env: 1.1.0
|
proxy-from-env: 1.1.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
@ -10305,8 +10299,6 @@ snapshots:
|
|||||||
|
|
||||||
dotenv@16.4.5: {}
|
dotenv@16.4.5: {}
|
||||||
|
|
||||||
driver.js@1.3.1: {}
|
|
||||||
|
|
||||||
duplexer2@0.1.4:
|
duplexer2@0.1.4:
|
||||||
dependencies:
|
dependencies:
|
||||||
readable-stream: 2.3.8
|
readable-stream: 2.3.8
|
||||||
@ -10954,6 +10946,8 @@ snapshots:
|
|||||||
|
|
||||||
flatted@3.3.1: {}
|
flatted@3.3.1: {}
|
||||||
|
|
||||||
|
follow-redirects@1.15.6: {}
|
||||||
|
|
||||||
follow-redirects@1.15.6(debug@4.3.4):
|
follow-redirects@1.15.6(debug@4.3.4):
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
|
@ -1,41 +1,38 @@
|
|||||||
<template>
|
<template>
|
||||||
<PageWrapper title="引导页" content="用于给用户的指引操作">
|
<PageWrapper title="引导页" content="用于给用户的指引操作">
|
||||||
<a-button type="primary" @click="handleStart">开始</a-button>
|
<a-button type="primary" @click="handleOpen(true)">开始</a-button>
|
||||||
|
<Tour v-model:current="current" :open="open" :steps="steps" @close="handleOpen(false)" />
|
||||||
</PageWrapper>
|
</PageWrapper>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { PageWrapper } from '@/components/Page';
|
import { PageWrapper } from '@/components/Page';
|
||||||
import { useDesign } from '@/hooks/web/useDesign';
|
import { useDesign } from '@/hooks/web/useDesign';
|
||||||
import { driver } from 'driver.js';
|
import { ref } from 'vue';
|
||||||
import 'driver.js/dist/driver.css';
|
import { Tour, TourProps } from 'ant-design-vue';
|
||||||
|
|
||||||
|
const open = ref<boolean>(false);
|
||||||
const { prefixVar } = useDesign('');
|
const { prefixVar } = useDesign('');
|
||||||
|
|
||||||
function handleStart() {
|
const current = ref(0);
|
||||||
driver({
|
const steps: TourProps['steps'] = [
|
||||||
showProgress: true,
|
|
||||||
steps: [
|
|
||||||
{
|
{
|
||||||
popover: {
|
|
||||||
title: 'Welcome',
|
title: 'Welcome',
|
||||||
description: 'Hello World! 👋',
|
description: 'Hello World! 👋',
|
||||||
},
|
},
|
||||||
},
|
|
||||||
{
|
{
|
||||||
element: `.${prefixVar}-layout-header-trigger`,
|
|
||||||
popover: {
|
|
||||||
title: 'Collapse Button',
|
title: 'Collapse Button',
|
||||||
description: 'This is the menu collapse button.',
|
description: 'This is the menu collapse button.',
|
||||||
},
|
target: () => document.querySelector(`.${prefixVar}-layout-header-trigger`) as HTMLElement,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
element: `.${prefixVar}-layout-header-action`,
|
|
||||||
popover: {
|
|
||||||
title: 'User Action',
|
title: 'User Action',
|
||||||
description: 'This is the user function area.',
|
description: 'This is the user function area.',
|
||||||
|
target: () => document.querySelector(`.${prefixVar}-layout-header-action`) as HTMLElement,
|
||||||
},
|
},
|
||||||
},
|
];
|
||||||
],
|
|
||||||
}).drive();
|
const handleOpen = (val: boolean): void => {
|
||||||
}
|
current.value = 0;
|
||||||
|
open.value = val;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user