fix:暂存用户引导页面

This commit is contained in:
zhangyu
2022-06-24 16:24:53 +08:00
parent fb22f2d9fe
commit d0cb1995bf
14 changed files with 139 additions and 30 deletions

View File

@@ -0,0 +1,46 @@
.is-intro.el-dialog{
max-height: unset;
max-width: unset;
height: 100%;
.el-dialog__header{
display: none;
}
.el-dialog__body{
height: 100%;
padding: 0;
> div{
height: 100%;
}
}
}
.dc-img{
width: 100%;
height: 100%;
background: url("~@/assets/img/jj.png") no-repeat;
background-size:cover;
}
.dc-img1{
width: 100%;
height: 100%;
background: url("~@/assets/img/jj1.png") no-repeat;
background-size:cover;
}
.dc-img2{
width: 100%;
height: 100%;
background: url("~@/assets/img/jj3.png") no-repeat;
background-size:cover;
}
.dc-img3{
width: 100%;
height: 100%;
background: url("~@/assets/img/dc3.png") no-repeat;
background-size:cover;
}
.intro-bottom{
position: fixed;
right: 20px;
bottom: 20px;
display: flex;
flex-direction: column;
}

View File

@@ -66,6 +66,7 @@
@import './common/elementSet.scss';
@import './common/loading.scss';
@import './common/login.scss';
@import './common/intro.scss';
@import './common/multipleTime.scss';
@import './common/nezhaColor.scss';
@import './common/nzTransfer.scss';

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

View File

@@ -3,6 +3,8 @@ import locale from 'element-ui/lib/locale'
import VueI18n from 'vue-i18n'
import { get } from '@/http'
import messages from './language'
import enLocale from 'element-ui/lib/locale/lang/en' // 引入element语言包
import zhLocale from 'element-ui/lib/locale/lang/zh-CN' // 引入element语言包
Vue.use(VueI18n)
// 从localStorage获取语言选择。
const i18n = new VueI18n({
@@ -14,7 +16,12 @@ locale.i18n((key, value) => i18n.t(key, value)) // 兼容element
export function loadI18n (i18nData) {
if (i18nData) {
Object.keys(i18nData).forEach(lang => {
i18n.setLocaleMessage(lang, i18nData[lang])
if (lang === 'zh') {
Object.assign(i18nData[lang], { ...zhLocale })
} else if (lang === 'en') {
Object.assign(i18nData[lang], { ...enLocale })
}
i18n.setLocaleMessage(lang, { ...i18nData[lang] })
})
}
}

View File

@@ -0,0 +1,78 @@
<template>
<el-dialog
width="100%"
height="100%"
title="内层 Dialog"
:custom-class="'is-intro'"
:show-close="false"
:visible.sync="showIntro"
append-to-body>
<div>
<div v-if="introStep==='main'">
<el-button @click="introStepChange('dc')">设置dc</el-button>
<el-button>设置asset</el-button>
<el-button>设置project</el-button>
<el-button>设置dc</el-button>
</div>
<div v-if="introStep === 'dc'" style="height: 100%">
<div v-if="step === 0" class="dc-img"></div>
<div v-else-if="step === 1" class="dc-img1"></div>
<div v-else-if="step === 2" class="dc-img2"></div>
<div v-else-if="step === 3" class="dc-img3"></div>
<div v-else>
<el-button @click="introStepChange('asset')">继续设置asset</el-button>
</div>
</div>
<div v-if="introStep === 'asset'" style="height: 100%">
<div v-if="step === 0" >设置asset</div>
<div v-if="step === 1" ></div>
<div v-if="step === 2" ></div>
<div v-if="step === 3" ></div>
<div v-if="step === 4" ></div>
</div>
<div class="intro-bottom">
<el-button @click="prev()">上一步</el-button>
<el-button @click="next()">下一步</el-button>
<el-button @click="exit()">退出</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
export default {
name: 'intro',
data: function () {
return {
showIntro: false,
introStep: 'main',
step: 0,
timer: ''
}
},
methods: {
introStepChange (type) {
this.step = 0
this.introStep = type
},
prev () {
this.step--
},
next () {
this.step++
if (this.introStep == 'dc' && this.step === 4) {
this.timer = setTimeout(() => {
this.introStepChange('main')
})
}
},
exit () {
this.showIntro = false
}
}
}
</script>
<style scoped>
</style>

View File

@@ -97,5 +97,4 @@ const newen = {
},
...enLocale
}
export default newen

View File

@@ -66,6 +66,7 @@
</el-dropdown>
</div>
<guide :show-dialog="showGuide" @dialogClosed="dialogClosed" @close="showGuide = false"></guide>
<intro></intro>
<!-- <span v-for="item in fontData" :key="item">-->
<!-- <span class="temp-dom" :class="`temp-dom&#45;&#45;${fontSzie}`" v-for="fontSzie in [12,13,14,15]" :key="fontSzie">{{item}}</span>-->
<!-- </span>-->
@@ -76,16 +77,19 @@
import bus from '../../libs/bus'
import { mapActions } from 'vuex'
import guide from '@/components/common/popBox/guide'
import intro from '@/components/common/intro'
export default {
name: 'Header',
components: {
guide
guide,
intro
},
data () {
return {
username: '',
name: '',
language: 'en',
showIntro: 'true',
// 顶部菜单相关
createMenu: [ // 新增按钮内容
{
@@ -228,32 +232,6 @@ export default {
this.getLinkData()
}
window.addEventListener('visibilitychange', this.testUser)
// setTimeout(() => {
// this.$intro()
// .setOptions({
// // 我给看的效果图是英⽂的(默认英⽂),这⾥是更换成中⽂
// prevLabel: '上⼀步',
// nextLabel: '下⼀步',
// skipLabel: '跳过',
// doneLabel: '完成',
// // steps步骤可以写个⼯具类保存起来
// steps: this.steps,
// dontShowAgain: true
// })
// .oncomplete(() => {
// // 需要注意的是,这⾥⽤了箭头函数
// // 点击结束按钮后执⾏的事件
// })
// .onexit(() => {
// // 点击跳过按钮后执⾏的事件
// })
// .onbeforeexit(() => {
// // 确认完毕之后执⾏的事件
// // return confirm('Are you sure?')
// })
// // this.$intro('#personal').start() // start the guide
// // this.$intro('#personal').showHints() // show hints
// }, 1000)
},
computed: {
linkData () {

File diff suppressed because one or more lines are too long