Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
JuyuanPrimarySchool
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vue-project
JuyuanPrimarySchool
Commits
1c17b3b0
Commit
1c17b3b0
authored
Nov 15, 2021
by
zsh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
8b7e48a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
index.vue
src/components/Header/index.vue
+16
-8
No files found.
src/components/Header/index.vue
View file @
1c17b3b0
<
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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment