Commit 8f85804ac3b1f53af13a44936cc8667922552ed7
Merge remote-tracking branch 'origin/branch_dev' into branch_dev
# Conflicts: # src/router/index.js # src/views/service.vue
Showing
2 changed files
with
39 additions
and
38 deletions
src/components/NavMenu.vue deleted
1 | -<template> | |
2 | - <div class="navMenu"> | |
3 | - | |
4 | - <label v-for="navMenu in navMenus"> | |
5 | - | |
6 | - <el-menu-item v-if="navMenu.childs==null&&navMenu.entity" | |
7 | - :key="navMenu.entity.id" :data="navMenu" :index="navMenu.entity.url"> | |
8 | - <i :class="navMenu.entity.icon"></i> | |
9 | - <span slot="title">{{navMenu.entity.title}}</span> | |
10 | - </el-menu-item> | |
11 | - | |
12 | - <el-submenu v-if="navMenu.childs&&navMenu.entity" | |
13 | - :key="navMenu.entity.id" :data="navMenu" :index="navMenu.entity.url"> | |
14 | - <template slot="title"> | |
15 | - <i :class="navMenu.entity.icon"></i> | |
16 | - <span>{{navMenu.entity.title}}</span> | |
17 | - </template> | |
18 | - <NavMenu :navMenus="navMenu.childs"></NavMenu> | |
19 | - </el-submenu> | |
20 | - </label> | |
21 | - | |
22 | - </div> | |
23 | -</template> | |
24 | - | |
25 | -<script> | |
26 | - export default { | |
27 | - name: 'NavMenu', | |
28 | - props: ['navMenus'], | |
29 | - data() { | |
30 | - return {} | |
31 | - }, | |
32 | - methods: {} | |
33 | - } | |
34 | -</script> | |
35 | -<style scoped> | |
36 | - | |
37 | -</style> |
src/components/VHeader.vue
... | ... | @@ -2,6 +2,16 @@ |
2 | 2 | <div class="header-wrap"> |
3 | 3 | <div class="header"> |
4 | 4 | <div class="fl logo-bg" @click="$router.push({name:'home'})"></div> |
5 | + <div class="fr login-cont"> | |
6 | + <router-link class="no-login " :to="{path:list.routerLink}" | |
7 | + v-for="(list, index) in loginList" | |
8 | + :key="index">{{list.name}}</router-link> | |
9 | + <div class="login-after display-none"> | |
10 | + <div class="login fl" id="login-uerName" title="用户">用户 | |
11 | + </div> | |
12 | + <div class="loginout fl"><a>退出</a></div> | |
13 | + </div> | |
14 | + </div> | |
5 | 15 | <ul class="fr nav"> |
6 | 16 | <!--<li>首页</li>--> |
7 | 17 | <!--<li>停车服务</li>--> |
... | ... | @@ -32,7 +42,11 @@ export default { |
32 | 42 | {name:'官网中心',routerLink:'/center'}, |
33 | 43 | {name:'黄石停车',routerLink:'/park'}, |
34 | 44 | {name:'关于我们',routerLink:'/about'}, |
35 | - ] | |
45 | + ], | |
46 | + loginList:[ | |
47 | + {name:'请登录',routerLink:'/login'}, | |
48 | + ], | |
49 | + | |
36 | 50 | } |
37 | 51 | } |
38 | 52 | } |
... | ... | @@ -140,4 +154,28 @@ export default { |
140 | 154 | cursor: pointer; |
141 | 155 | border-bottom: 2px solid rgba(218,36,49,1); |
142 | 156 | } |
157 | + .display-none{ | |
158 | + display: none; | |
159 | + } | |
160 | + .login-cont{ | |
161 | + margin-left: 10px; | |
162 | + cursor: pointer; | |
163 | + color: #fff; | |
164 | + } | |
165 | + .login-after{ | |
166 | + height: 80px; | |
167 | + width: auto; | |
168 | + } | |
169 | + .login{ | |
170 | + margin-left: 10px; | |
171 | + max-width: 100px; | |
172 | + overflow: hidden; | |
173 | + white-space: nowrap; | |
174 | + text-overflow: ellipsis; | |
175 | + height: 80px; | |
176 | + } | |
177 | + .loginout{ | |
178 | + margin-left: 10px; | |
179 | + } | |
180 | + | |
143 | 181 | </style> | ... | ... |