Commit 1c17b3b0 by zsh

update

parent 8b7e48a7
<template>
<header id="header">
<div class="logo">
<img src="./images/logo.png" alt="logo">
<img src="./images/logo.png" alt="科艺logo"><span class="logo-desc">数字化管理平台</span>
</div>
<h2 class="title"><span>{{ currPageTitle }}</span></h2>
<div class="date">
......@@ -18,17 +18,17 @@ let timerId = null
export default {
data () {
return {
currPageTitle: '',
fullDate: '',
fullTime: ''
}
},
computed: {
// 当前页面名称
currPageTitle () {
const { meta = {} } = this.$router.currentRoute
return meta.title || ''
watch: {
'$route' (oldVal = {}, newVal = {}) {
if (oldVal.path !== newVal.path) {
this.getCurrRoute()
}
}
},
......@@ -36,6 +36,8 @@ export default {
window.vm = this
this.getSysTime()
this.getCurrRoute()
},
beforeDestroy () {
......@@ -44,6 +46,11 @@ export default {
},
methods: {
getCurrRoute () {
const { meta = {} } = this.$router.currentRoute
this.currPageTitle = meta.title || ''
},
getSysTime () {
const that = this
try {
......@@ -94,6 +101,7 @@ export default {
line-height: @pageHeaderHeight + 4;
white-space: nowrap;
text-align: center;
background: url('./images/header-bg.png') no-repeat center top;
> span {
font-size: 34px;
......@@ -115,7 +123,7 @@ export default {
> span {
font-size: 18px;
font-family: Source Han Sans CN;
font-family: 'CenturyGothic';
}
.curr-times {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment