You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
91 lines
2.0 KiB
91 lines
2.0 KiB
<template>
|
|
<dv-full-screen-container class="app">
|
|
<dv-loading v-show="isLoding">Loading...</dv-loading>
|
|
<comHeader></comHeader>
|
|
<main class="contentBox" @click="enterFullscreen">
|
|
<router-view></router-view>
|
|
</main>
|
|
</dv-full-screen-container>
|
|
</template>
|
|
|
|
<script>
|
|
import comHeader from '@/components/comHeader/index.vue';
|
|
export default {
|
|
data: () => {
|
|
return {
|
|
isLoding: false,
|
|
};
|
|
},
|
|
mounted() {
|
|
setTimeout(() => {
|
|
this.isLoding = false;
|
|
this.enterFullscreen();
|
|
}, 1000);
|
|
},
|
|
methods: {
|
|
enterFullscreen() {
|
|
const element = document.documentElement;
|
|
// 请求全屏模式
|
|
if (!this.isLoding) {
|
|
if (element.webkitRequestFullscreen) {
|
|
// Chrome, Safari and Opera
|
|
element.webkitRequestFullscreen();
|
|
} else if (element.msRequestFullscreen) {
|
|
// IE/Edge
|
|
element.msRequestFullscreen();
|
|
} else if (element.mozRequestFullScreen) {
|
|
// Firefox
|
|
element.mozRequestFullScreen();
|
|
} else if (element.requestFullscreen) {
|
|
element.requestFullscreen();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
components: {
|
|
comHeader,
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
@font-face {
|
|
font-family: 'DIN-Bold';
|
|
src: url('@/assets/fonts/DIN-Bold.otf') format('opentype');
|
|
}
|
|
|
|
.numFont {
|
|
font-family: 'DIN-Bold';
|
|
}
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
text-decoration: none;
|
|
list-style: none;
|
|
color: #fff;
|
|
font-family: Microsoft YaHei;
|
|
}
|
|
.app {
|
|
width: 100%;
|
|
height: 100%;
|
|
background-image: url('@/assets/img/bg.png');
|
|
background-size: cover;
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
.contentBox {
|
|
height: calc(100% - 100px);
|
|
display: flex;
|
|
box-sizing: border-box;
|
|
padding: 20px;
|
|
padding-top: 0px;
|
|
}
|
|
}
|
|
/* 定义渐变的样式 */
|
|
.gradientText {
|
|
background: linear-gradient(to top, #0592ff, #fff);
|
|
background-clip: text;
|
|
-webkit-background-clip: text;
|
|
color: transparent;
|
|
}
|
|
</style>
|