<!--
|
* @Date: 2024-01-04 19:40:32
|
* @LastEditors: Sneed
|
* @LastEditTime: 2024-01-23 18:38:18
|
* @FilePath: /belleson-frontend/Users/mache/Documents/demo/mdc/src/components/home/index.vue
|
-->
|
<template>
|
<div class="home">
|
<div class="header">
|
<img src="~@/assets/img/login/logo.png" alt="">
|
<div class="menu">
|
<slot name="menu"></slot>
|
</div>
|
<p class="time">{{time1}}<span>{{time2}}</span></p>
|
</div>
|
<div class="content">
|
<slot name="content"></slot>
|
</div>
|
<div class="footer">
|
</div>
|
</div>
|
</template>
|
<script>
|
import dayjs from 'dayjs'
|
let timer
|
export default {
|
data () {
|
return {
|
time1: '',
|
time2: ''
|
}
|
},
|
created () {
|
timer = setInterval(() => {
|
this.time1 = dayjs().format('YYYY/MM/DD')
|
this.time2 = dayjs().format('HH:mm:ss')
|
},1000)
|
},
|
beforeDestroy() {
|
clearInterval(timer)
|
},
|
mounted () {
|
console.log(this, '------')
|
}
|
}
|
</script>
|
<style lang="scss" scoped>
|
$bg:#2d3a4b;
|
$dark_gray:#889aa4;
|
$light_gray:#eee;
|
.home {
|
/*position: relative;*/
|
height: 100%;
|
width: 100%;
|
background-color: $bg;
|
overflow: auto;
|
display: flex;
|
flex-direction: column;
|
.header {
|
position: relative;
|
padding-left: 24px;
|
padding-right: 24px;
|
height: 94px;
|
flex: 0 0 auto;
|
background-image: url('~@/assets/img/login/top.png');
|
background-size: contain;
|
display: flex;
|
align-items: center;
|
// justify-content: space-between;
|
& > img {
|
flex: 0 0 auto;
|
width: 500px;
|
max-height: 91px;
|
align-self: flex-start;
|
}
|
.menu {
|
height: 50px;
|
margin-left: auto;
|
}
|
.time {
|
// position: absolute;
|
color: #fff;
|
font-size: 20px;
|
span {
|
margin-left: 14px;
|
font-family: digital;
|
font-size: 30px;
|
}
|
}
|
}
|
.content {
|
flex: 1 1 auto;
|
background-image: url('~@/assets/img/login/bg.png');
|
background-size: cover;
|
background-repeat: no-repeat;
|
position: relative;
|
overflow: hidden;
|
.compName {
|
font-size: 23px;
|
color: #FFFFFF;
|
line-height: 33px;
|
position: absolute;
|
left: 0;
|
right: 0;
|
text-align: center;
|
bottom: 30px;
|
}
|
}
|
.footer {
|
height: 46px;
|
background-image: url('~@/assets/img/login/footer.png');
|
background-size: cover;
|
background-repeat: no-repeat;
|
flex: 0 0 auto;
|
}
|
}
|
</style>
|