-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(demo): added guide page example
- Loading branch information
Showing
9 changed files
with
140 additions
and
37 deletions.
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
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,3 @@ | ||
export default { | ||
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default { | ||
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,14 @@ | ||
import type { MenuModule } from '/@/router/types'; | ||
import { t } from '/@/hooks/web/useI18n'; | ||
|
||
const setup: MenuModule = { | ||
orderNo: 90000, | ||
menu: { | ||
path: '/setup/index', | ||
name: t('routes.demo.setup.page'), | ||
tag: { | ||
content: 'new', | ||
}, | ||
}, | ||
}; | ||
export default setup; |
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,28 @@ | ||
import type { AppRouteModule } from '/@/router/types'; | ||
|
||
import { LAYOUT } from '/@/router/constant'; | ||
import { t } from '/@/hooks/web/useI18n'; | ||
|
||
const setup: AppRouteModule = { | ||
path: '/setup', | ||
name: 'SetupDemo', | ||
component: LAYOUT, | ||
redirect: '/setup/index', | ||
meta: { | ||
icon: 'simple-icons:about-dot-me', | ||
title: t('routes.demo.setup.page'), | ||
}, | ||
children: [ | ||
{ | ||
path: 'index', | ||
name: 'SetupDemoPage', | ||
component: () => import('/@/views/demo/setup/index.vue'), | ||
meta: { | ||
title: t('routes.demo.setup.page'), | ||
icon: 'whh:paintroll', | ||
}, | ||
}, | ||
], | ||
}; | ||
|
||
export default setup; |
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,43 @@ | ||
<template> | ||
<PageWrapper title="引导页" content="用于给用于指引操作"> | ||
<a-button type="primary" @click="handleStart">开始</a-button> | ||
</PageWrapper> | ||
</template> | ||
<script lang="ts"> | ||
import { defineComponent } from 'vue'; | ||
import { PageWrapper } from '/@/components/Page'; | ||
import { useDesign } from '/@/hooks/web/useDesign'; | ||
import intro from 'intro.js'; | ||
import 'intro.js/introjs.css'; | ||
export default defineComponent({ | ||
components: { PageWrapper }, | ||
setup() { | ||
const { prefixVar } = useDesign(''); | ||
function handleStart() { | ||
intro() | ||
.setOptions({ | ||
steps: [ | ||
{ | ||
title: 'Welcome', | ||
intro: 'Hello World! 👋', | ||
}, | ||
{ | ||
title: 'Collapse Button', | ||
element: document.querySelector(`.${prefixVar}-layout-header-trigger`)!, | ||
intro: 'This is the menu collapse button.', | ||
}, | ||
{ | ||
title: 'User Action', | ||
element: document.querySelector(`.${prefixVar}-layout-header-action`)!, | ||
intro: 'This is the user function area.', | ||
}, | ||
], | ||
}) | ||
.start(); | ||
} | ||
return { handleStart }; | ||
}, | ||
}); | ||
</script> |
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