Commit 8effed3d by 汤强勇

导航修改

parent bf891144
<template> <template lang="pug">
<el-container> el-container.header-container
<el-header style="text-align: right; font-size: 12px"> nav.header-nav
<i class="el-icon-menu"></i> ul.clear
<el-dropdown> li.nav-item.fl
<i class="el-icon-setting" style="margin-right: 15px"></i> a.link
<el-dropdown-menu slot="dropdown"> i.fa.fa-th-list
<el-dropdown-item>查看</el-dropdown-item> li.nav-item.fl
<el-dropdown-item>新增</el-dropdown-item> a.link
<el-dropdown-item>删除</el-dropdown-item> i.fa.fa-th-large
</el-dropdown-menu> li.nav-item.fl
</el-dropdown> a.link
<span>王小虎</span> i.fa.fa-clock-o
</el-header> .history-links-preview.fl
</el-container> .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> </template>
<style> <style lang="stylus">
.el-header { .header-container
background-color: gray; position fixed
color: #333; left 0
line-height: 60px; right 0
} top 0
.el-aside { z-index 99
color: #333; 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>
<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>
...@@ -123,7 +123,7 @@ export default { ...@@ -123,7 +123,7 @@ export default {
position relative position relative
height 100px height 100px
display inline-block display inline-block
z-index 5 z-index 100
.sidebar .sidebar
position fixed position fixed
left 0 left 0
......
...@@ -31,7 +31,7 @@ export default { ...@@ -31,7 +31,7 @@ export default {
.content-box .content-box
position absolute position absolute
display inline-block display inline-block
top 70px top 58px
bottom 0 bottom 0
width 80% width 80%
-webkit-transition left 0.3s ease-in-out -webkit-transition left 0.3s ease-in-out
......
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