Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
fengchao-website
Project
Project
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
tf-boys
fengchao-website
Commits
b77602fe
Commit
b77602fe
authored
Jul 04, 2017
by
pyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加路由切换tab判断
parent
d8fc4d7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
m-header.vue
src/components/m-header/m-header.vue
+21
-2
No files found.
src/components/m-header/m-header.vue
View file @
b77602fe
...
@@ -3,14 +3,33 @@
...
@@ -3,14 +3,33 @@
<div
class=
"nav"
>
<div
class=
"nav"
>
<div
class=
"logo"
>
小云蜂巢
</div>
<div
class=
"logo"
>
小云蜂巢
</div>
<ul
class=
"menus"
>
<ul
class=
"menus"
>
<li><a
class=
"active
"
href=
"/content"
>
内容管理工具
</a></li>
<li><a
:class=
"current === 0 ? 'active' : ''
"
href=
"/content"
>
内容管理工具
</a></li>
<li><a
href=
"/ads"
>
广告交易平台
</a></li>
<li><a
:class=
"current === 1 ? 'active' : ''"
href=
"/ads"
>
广告交易平台
</a></li>
</ul>
</ul>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
data
()
{
return
{
current
:
0
}
},
beforeMount
()
{
switch
(
location
.
pathname
)
{
case
'/content'
:
this
.
current
=
0
break
case
'/ads'
:
this
.
current
=
1
break
default
:
this
.
current
=
0
}
}
}
</
script
>
</
script
>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<!-- Add "scoped" attribute to limit CSS to this component only -->
...
...
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