This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat(demo): add 'steps' page (#165) * fix: 修复引导页文件名问题 --------- Co-authored-by: jackhoo_98 <[email protected]>
- Loading branch information
1 parent
b376026
commit a9b2021
Showing
8 changed files
with
93 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<script lang="ts" setup> | ||
import { driver } from 'driver.js' | ||
import 'driver.js/dist/driver.css' | ||
const steps = [ | ||
{ | ||
element: '.app-logo.layout-menu__logo', | ||
popover: { | ||
title: 'Welcome', | ||
description: 'Hello World! 👋', | ||
}, | ||
}, | ||
{ | ||
element: `.n-layout-toggle-button`, | ||
popover: { | ||
title: 'Collapse Button', | ||
description: 'This is the menu collapse button.', | ||
}, | ||
}, | ||
{ | ||
element: `#userActionElement`, | ||
popover: { | ||
title: 'User Action', | ||
description: 'This is the user function area.', | ||
}, | ||
}, | ||
] | ||
const handleStart = () => { | ||
driver({ | ||
showProgress: true, | ||
steps: steps, | ||
}).drive() | ||
} | ||
</script> | ||
<template> | ||
<VbenCard> | ||
<VbenCard title="引导页"> | ||
用于给用户的指引操作。 | ||
<a href="https://driverjs.com" target="_blank" rel="noopener noreferrer" | ||
>更多用法</a | ||
> | ||
<template #footer> | ||
<VbenButton type="primary" @click="handleStart">开始</VbenButton> | ||
</template> | ||
</VbenCard> | ||
</VbenCard> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,5 +71,8 @@ export default { | |
accountSetting: 'Setting', | ||
}, | ||
transition: 'Transition', | ||
steps: { | ||
page: 'Intro page', | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,5 +72,8 @@ export default { | |
accountSetting: '个人设置', | ||
}, | ||
transition: '过渡动画', | ||
steps: { | ||
page: '引导页', | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { LAYOUT } from '../basic' | ||
|
||
const steps: RouteRecordItem = { | ||
path: '/steps', | ||
name: 'StepsDemo', | ||
component: LAYOUT, | ||
redirect: '/steps/index', | ||
meta: { | ||
orderNo: 90000, | ||
icon: 'whh:paintroll', | ||
title: 'routes.demo.steps.page', | ||
root: true, | ||
hideChildrenInMenu: true, | ||
}, | ||
children: [ | ||
{ | ||
path: 'index', | ||
name: 'StepsDemoPage', | ||
component: () => import('@/pages/demo/steps/steps.vue'), | ||
meta: { | ||
title: 'routes.demo.steps.page', | ||
icon: 'whh:paintroll', | ||
hideMenu: true, | ||
}, | ||
}, | ||
], | ||
} | ||
|
||
export default steps |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.