add guide
This commit is contained in:
parent
240dec3ccc
commit
eca9a22a55
|
@ -77,6 +77,10 @@ export default {
|
||||||
roles: 'Your roles',
|
roles: 'Your roles',
|
||||||
switchRoles: 'Switch roles'
|
switchRoles: 'Switch roles'
|
||||||
},
|
},
|
||||||
|
guide: {
|
||||||
|
description: 'The guide page is useful for some people who entered the project for the first time. You can briefly introduce the features of the project. Demo is based on ',
|
||||||
|
button: 'Show Guide'
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
documentation: 'Documentation',
|
documentation: 'Documentation',
|
||||||
tinymceTips: 'Rich text editor is a core part of management system, but at the same time is a place with lots of problems. In the process of selecting rich texts, I also walked a lot of detours. The common rich text editors in the market are basically used, and the finally chose Tinymce. See documentation for more detailed rich text editor comparisons and introductions.',
|
tinymceTips: 'Rich text editor is a core part of management system, but at the same time is a place with lots of problems. In the process of selecting rich texts, I also walked a lot of detours. The common rich text editors in the market are basically used, and the finally chose Tinymce. See documentation for more detailed rich text editor comparisons and introductions.',
|
||||||
|
|
|
@ -77,6 +77,10 @@ export default {
|
||||||
roles: '你的权限',
|
roles: '你的权限',
|
||||||
switchRoles: '切换权限'
|
switchRoles: '切换权限'
|
||||||
},
|
},
|
||||||
|
guide: {
|
||||||
|
description: '引导页对于一些第一次进入项目的人很有用,你可以简单介绍下项目的功能。本 Demo 是基于',
|
||||||
|
button: '打开引导'
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
documentation: '文档',
|
documentation: '文档',
|
||||||
tinymceTips: '富文本是管理后台一个核心的功能,但同时又是一个有很多坑的地方。在选择富文本的过程中我也走了不少的弯路,市面上常见的富文本都基本用过了,最终权衡了一下选择了Tinymce。更详细的富文本比较和介绍见',
|
tinymceTips: '富文本是管理后台一个核心的功能,但同时又是一个有很多坑的地方。在选择富文本的过程中我也走了不少的弯路,市面上常见的富文本都基本用过了,最终权衡了一下选择了Tinymce。更详细的富文本比较和介绍见',
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
const steps = [
|
||||||
|
{
|
||||||
|
element: '.hamburger-container',
|
||||||
|
popover: {
|
||||||
|
title: 'Hamburger',
|
||||||
|
description: 'Open && Close sidebar',
|
||||||
|
position: 'bottom'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
element: '.breadcrumb-container',
|
||||||
|
popover: {
|
||||||
|
title: 'Breadcrumb',
|
||||||
|
description: 'Indicate the current page location',
|
||||||
|
position: 'bottom'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
element: '.screenfull',
|
||||||
|
popover: {
|
||||||
|
title: 'Screenfull',
|
||||||
|
description: 'Bring the page into fullscreen',
|
||||||
|
position: 'left'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
element: '.international-icon',
|
||||||
|
popover: {
|
||||||
|
title: 'Switch language',
|
||||||
|
description: 'Switch the system language',
|
||||||
|
position: 'left'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
element: '.theme-switch',
|
||||||
|
popover: {
|
||||||
|
title: 'Theme Switch',
|
||||||
|
description: 'Custom switch system theme',
|
||||||
|
position: 'left'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
element: '.tags-view-container',
|
||||||
|
popover: {
|
||||||
|
title: 'Tags view',
|
||||||
|
description: 'The history of the page you visited',
|
||||||
|
position: 'bottom'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
export default steps
|
|
@ -1,75 +1,34 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container documentation-container">
|
<div class="app-container">
|
||||||
<el-button type="primary" @click.prevent.stop="guide">Show Guide</el-button>
|
<p class="warn-content">
|
||||||
|
{{$t('guide.description')}}
|
||||||
|
<a href="https://github.com/kamranahmedse/driver.js" target="_blank">driver.js.
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<el-button icon='el-icon-question' type="primary" @click.prevent.stop="guide">{{$t('guide.button')}}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
|
||||||
|
|
||||||
import * as Driver from 'driver.js'
|
<script>
|
||||||
import 'driver.js/dist/driver.min.css'
|
import * as Driver from 'driver.js' // import driver.js
|
||||||
|
import 'driver.js/dist/driver.min.css' // import driver.js css
|
||||||
|
import steps from './defineSteps'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'guide',
|
name: 'guide',
|
||||||
components: { },
|
|
||||||
mounted() {
|
|
||||||
this.driver = new Driver()
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
driver: null
|
driver: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.driver = new Driver()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
guide() {
|
guide() {
|
||||||
this.driver.defineSteps([
|
this.driver.defineSteps(steps)
|
||||||
{
|
|
||||||
element: '.screenfull',
|
|
||||||
popover: {
|
|
||||||
title: 'Screenfull',
|
|
||||||
description: 'Body of the popover',
|
|
||||||
position: 'left'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
element: '.international-icon',
|
|
||||||
popover: {
|
|
||||||
title: 'Lang Switch',
|
|
||||||
description: 'Body of the popover',
|
|
||||||
position: 'left'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
element: '.theme-switch',
|
|
||||||
popover: {
|
|
||||||
title: 'Theme Switch',
|
|
||||||
description: 'Body of the popover',
|
|
||||||
position: 'left'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
])
|
|
||||||
this.driver.start()
|
this.driver.start()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
.documentation-container {
|
|
||||||
margin: 50px;
|
|
||||||
.document-btn {
|
|
||||||
float: left;
|
|
||||||
margin-left: 50px;
|
|
||||||
vertical-align: middle;
|
|
||||||
display: block;
|
|
||||||
cursor: pointer;
|
|
||||||
background: black;
|
|
||||||
color: white;
|
|
||||||
height: 60px;
|
|
||||||
width: 200px;
|
|
||||||
line-height: 60px;
|
|
||||||
font-size: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
Loading…
Reference in New Issue