Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-4
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
office
haoban-4
Commits
c27ca227
Commit
c27ca227
authored
Sep 17, 2020
by
无尘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改菜单选中
parent
4de39743
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
5 deletions
+26
-5
vue-office-header.vue
src/components/vue-office-header.vue
+12
-2
index.vue
src/views/business/index.vue
+14
-3
No files found.
src/components/vue-office-header.vue
View file @
c27ca227
...
...
@@ -4,8 +4,12 @@
* @Author: 无尘
* @Date: 2019-10-10 17:21:32
* @LastEditors: 无尘
* @LastEditTime: 2020-09-1
5 10:08:05
* @LastEditTime: 2020-09-1
7 15:24:47
-->
<!--
<vue-office-header :project-name="projectName" :current-menu-code="currentMenuCode" @collapseTag="collapseTag" @toRouterView="toRouterView"> </vue-office-header>
import vueOfficeHeader from '@/components/vue-office-header.vue';
-->
<
template
>
<div
class=
"nav-header"
>
<!-- logo -->
...
...
@@ -13,7 +17,7 @@
<div
class=
"nav-header-item fl"
>
<template
v-for=
"(menuItem, index) in menuHead"
>
<a
:key=
"index"
:class=
"['item-link menu-font-16']"
@
click=
"changeRouter(menuItem)"
>
<span
:class=
"['inline-block bottom', menuItem.menuUrl.indexOf(pathName) != -1 ? 'current-module' : '']"
>
{{
menuItem
.
menuName
}}
</span>
<span
:class=
"['inline-block bottom', menuItem.menuUrl.indexOf(pathName) != -1
|| currentMenuCode == menuItem.menuCode
? 'current-module' : '']"
>
{{
menuItem
.
menuName
}}
</span>
</a>
</
template
>
<!-- 最右侧用户信息 -->
...
...
@@ -52,6 +56,12 @@ export default {
components
:
{
// setTip
},
props
:
{
currentMenuCode
:
{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
checkShow
:
true
,
...
...
src/views/business/index.vue
View file @
c27ca227
...
...
@@ -4,12 +4,12 @@
* @Author: 无尘
* @Date: 2018-10-10 14:44:45
* @LastEditors: 无尘
* @LastEditTime: 2020-09-
08 15:22:11
* @LastEditTime: 2020-09-
17 15:22:20
-->
<
template
>
<div
class=
"enterprise-wrap"
>
<!-- 公共头部菜单 -->
<vue-office-header
:project-name=
"projectName"
@
collapseTag=
"collapseTag"
@
toRouterView=
"toRouterView"
>
</vue-office-header>
<vue-office-header
:project-name=
"projectName"
:current-menu-code=
"currentMenuCode"
@
collapseTag=
"collapseTag"
@
toRouterView=
"toRouterView"
>
</vue-office-header>
<div
class=
"enterprise-wrap__body"
>
<div
id=
"content"
class=
"content"
>
<div
class=
"content-body"
:style=
"
{ height: contentHeight }">
...
...
@@ -31,6 +31,7 @@ export default {
data
()
{
return
{
projectName
:
'haoban-manage-web'
,
// 当前项目名
currentMenuCode
:
'contactsList'
,
collapseFlag
:
false
,
// 折叠参数
contentHeight
:
window
.
screen
.
availHeight
-
5
+
'px'
};
...
...
@@ -67,7 +68,17 @@ export default {
let
that
=
this
;
that
.
collapseFlag
=
val
;
}
}
},
watch
:
{
$route
:
{
handler
:
function
(
val
,
oldVal
)
{
const
that
=
this
;
that
.
currentMenuCode
=
'contactsList'
;
},
// 深度观察监听
deep
:
true
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
...
...
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