Skip to content

Commit 1e02149

Browse files
author
张晨曦
committed
补充点击头部tab按钮颜色变化
1 parent 64fddb2 commit 1e02149

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

web/src/dss/module/header/index.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,15 @@
118118
}
119119

120120
}
121+
.header-actived {
122+
color: $body-background;
123+
}
124+
125+
.header-actived:before {
126+
content: '';
127+
height: 2px;
128+
width: 16px;
129+
background-color: #2E92F7;
130+
position: absolute;
131+
top: 40px;
132+
}

web/src/dss/module/header/index.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
v-for="app in collections"
118118
:key="app.id"
119119
class="menu-item"
120+
:class="app.menuApplicationId == currentId ? 'header-actived' : '' "
120121
@click="goCollectedUrl(app)"
121122
>
122123
{{ app.title }}
@@ -187,6 +188,7 @@ export default {
187188
// luban-nav-menu
188189
favorites: [],
189190
collections: [],
191+
currentId: -1,
190192
};
191193
},
192194
mixins: [mixin],
@@ -247,6 +249,7 @@ export default {
247249
$route(v) {
248250
// 设定条件只有切换在工作空间首页时才触发
249251
if (v.name === "workspaceHome") {
252+
this.currentId = -1;
250253
this.init();
251254
this.getWorkspacesRoles()
252255
.then((res) => {
@@ -599,6 +602,7 @@ export default {
599602
// // this.$router.push({path: '/console',query: Object.assign({}, this.$route.query)});
600603
// },
601604
goCollectedUrl(app) {
605+
this.currentId = app.menuApplicationId || -1;
602606
this.gotoCommonIframe(app.name, {
603607
workspaceId: this.$route.query.workspaceId,
604608
});

0 commit comments

Comments
 (0)