VHeader.vue
1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<template>
<header class="header-wrap">
<span>车场实时概况</span>
<div class="header-time">
<p>{{headerDay}}</p>
<p>{{headerTime}}</p>
</div>
</header>
</template>
<script>
import { formateTime, formateday } from "../utils/formate";
export default {
name: 'VHeader',
data() {
return {
headerDay: formateday(),
headerTime: formateTime(),
}
}
}
</script>
<style scoped lang="scss">
header {
height: 65px;
text-align: center;
position: relative;
background-image: url("../images/header/headerbg.png");
background-repeat: no-repeat;
background-position: center center;
>span{
font-size: 32px;
line-height: 75px;
}
.header-time{
width: 128px;
height: 35px;
line-height: 18px;
position: absolute;
right: 10px;
top:16px;
padding-left: 45px;
text-align: left;
background:url("../images/header/headertime.png") no-repeat 0 center;
background-size: 35px 35px;
}
}
</style>