Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
common-templete
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
汤强勇
common-templete
Commits
8effed3d
Commit
8effed3d
authored
Nov 01, 2018
by
汤强勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导航修改
parent
bf891144
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
122 additions
and
26 deletions
+122
-26
index.vue
src/components/Header/index.vue
+120
-24
index.vue
src/components/Sidebar/index.vue
+1
-1
index.vue
src/pages/home/index.vue
+1
-1
No files found.
src/components/Header/index.vue
View file @
8effed3d
<
template
>
<el-container>
<el-header
style=
"text-align: right; font-size: 12px"
>
<i
class=
"el-icon-menu"
></i>
<el-dropdown>
<i
class=
"el-icon-setting"
style=
"margin-right: 15px"
></i>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item>
查看
</el-dropdown-item>
<el-dropdown-item>
新增
</el-dropdown-item>
<el-dropdown-item>
删除
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<span>
王小虎
</span>
</el-header>
</el-container>
<
template
lang=
"pug"
>
el-container.header-container
nav.header-nav
ul.clear
li.nav-item.fl
a.link
i.fa.fa-th-list
li.nav-item.fl
a.link
i.fa.fa-th-large
li.nav-item.fl
a.link
i.fa.fa-clock-o
.history-links-preview.fl
.history-item.fl('v-for'="(history,index) in historysLimit",':key'="index")
{{
history
.
name
}}
li.nav-item.fr
a.link
img.user-img(':src'="user.headerImage")
span.user-name
{{
user
.
name
}}
i.fa.fa-angle-down
li.nav-item.fr
a.link
i.fa.fa-envelope-o
li.nav-item.fr
a.link
i.fa.fa-comments
</
template
>
<
style
>
.el-header
{
background-color
:
gray
;
color
:
#333
;
line-height
:
60px
;
}
.el-aside
{
color
:
#333
;
}
<
style
lang=
"stylus"
>
.header-container
position
fixed
left
0
right
0
top
0
z-index
99
box-shadow
0px
1px
1px
rgba
(
0
,
0
,
0
,
.2
)
.header-nav
background
#EDEDED
width
100
%
padding-left
70px
.nav-item
display
inline-block
position
relative
.link
position
relative
display
block
padding
13px
15px
12px
font-weight
500
margin-left
0
line-height
32px
color
#5A738E
i
font-size
26px
vertical-align
middle
margin-top
-2px
.history-links-preview
margin-top
16px
margin-left
15px
</
style
>
<
style
lang=
"stylus"
scoped
>
.history-item
line-height
1
.7
border
1px
solid
#73879c
padding
0
15px
border-radius
12px
color
#73879c
&
+
&
margin-left
15px
&
:hover
color
inherit
border-color
inherit
background-color
inherit
.user-img
width
30px
height
30px
border-radius
50
%
vertical-align
middle
margin-right
10px
margin-top
1px
.user-name
margin-right
5px
i
.fa.fa-angle-down
font-size
15px
</
style
>
<
script
>
export
default
{
name
:
'headerNav'
,
data
()
{
return
{
user
:
{
headerImage
:
'http://photo.bigaka.com/photos//2132/201805/56741525659969939_144_144.jpg'
,
name
:
'测试商户组'
},
historys
:
[{
'name'
:
'自动标签'
,
'index'
:
'1,0,2'
,
'time'
:
'2018-11-01 10:06:07'
},
{
'name'
:
'快速查询'
,
'index'
:
'1,0,0'
,
'time'
:
'2018-10-31 17:17:09'
},
{
'name'
:
'营销推送'
,
'index'
:
'2,0,0'
,
'time'
:
'2018-10-31 17:12:53'
},
{
'name'
:
'会员圈选'
,
'index'
:
'1,0,1'
,
'time'
:
'2018-10-31 16:52:47'
},
{
'name'
:
'概览'
,
'index'
:
'0,0,0'
,
'time'
:
'2018-10-31 13:31:59'
},
{
'name'
:
'趋势'
,
'index'
:
'0,1,0'
,
'time'
:
'2018-10-29 15:52:31'
},
{
'name'
:
'会员卡设置'
,
'index'
:
'1,1,0'
,
'time'
:
'2018-10-29 15:51:00'
},
{
'name'
:
'生日营销(new)'
,
'index'
:
'2,0,2'
,
'time'
:
'2018-10-29 15:50:18'
}]
}
},
filters
:
{
limit
(
array
,
num
)
{
if
(
num
)
{
return
array
}
console
.
log
(
array
.
slice
(
0
,
num
))
return
array
.
slice
(
0
,
num
)
}
},
props
:
[
'icon'
,
'link'
,
'type'
,
'id'
,
'sort'
,
'name'
,
'pid'
,
'grade'
],
computed
:
{
historysLimit
()
{
let
historys
=
this
.
historys
if
(
historys
.
length
>
5
)
{
return
historys
.
slice
(
0
,
5
)
}
else
{
return
[...
historys
]
}
}
},
methods
:
{
clickItem
()
{
console
.
log
(
this
)
}
}
}
</
script
>
src/components/Sidebar/index.vue
View file @
8effed3d
...
...
@@ -123,7 +123,7 @@ export default {
position
relative
height
100px
display
inline-block
z-index
5
z-index
100
.sidebar
position
fixed
left
0
...
...
src/pages/home/index.vue
View file @
8effed3d
...
...
@@ -31,7 +31,7 @@ export default {
.content-box
position
absolute
display
inline-block
top
70
px
top
58
px
bottom
0
width
80
%
-webkit-transition
left
0
.3s
ease-in-out
...
...
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