Commit 8759ae2f by 胡悦

修改头部组件

1 parent 4859d0fd
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-10-25 10:12:26 * @Date: 2022-10-25 10:12:26
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2023-07-06 11:45:34 * @LastEditTime: 2023-07-06 11:56:03
* @FilePath: \dj-data-view\src\components\ViewTitle.vue * @FilePath: \dj-data-view\src\components\ViewTitle.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -12,13 +12,13 @@ ...@@ -12,13 +12,13 @@
<img style="height: 2.89vh" src="@/assets/images/logo.png" alt="logo" /> <img style="height: 2.89vh" src="@/assets/images/logo.png" alt="logo" />
</div> </div>
<div class="tab"> <div class="tab">
<div class="tab-item first-tab" @click.self="jump('home')"> <div class="tab-item first-tab" :class="currentMenu == 'home' ? 'active' : ''" @click.self="jump('home')">
{{ firstTab.label }} {{ firstTab.label }}
<img class="arrow-down" @click.stop="openSelect" src="@/assets/images/title-arrow.png" alt=""> <img class="arrow-down" @click.stop="openSelect" src="@/assets/images/title-arrow.png" alt="">
<SelectBox :isShow="isShow" :dataList="dataList" :boxWidth="'17.1vw'" isObject @selectVal="selectVal"></SelectBox> <SelectBox :isShow="isShow" :dataList="dataList" :boxWidth="'17.1vw'" isObject @selectVal="selectVal"></SelectBox>
</div> </div>
<div class="tab-item other-tab" @click="jump('operational')">运营数据</div> <div class="tab-item other-tab" :class="currentMenu == 'operational' ? 'active' : ''" @click="jump('operational')">运营数据</div>
<div class="tab-item other-tab" @click="jump('interior')">内部数据</div> <div class="tab-item other-tab" :class="currentMenu == 'interior' ? 'active' : ''" @click="jump('interior')">内部数据</div>
</div> </div>
<!-- <div class="view-title user-select">嘀加智慧门店运营看板</div> --> <!-- <div class="view-title user-select">嘀加智慧门店运营看板</div> -->
<div class="time"> <div class="time">
...@@ -39,7 +39,7 @@ export default { ...@@ -39,7 +39,7 @@ export default {
dataList: datas.DefaultData.businessList, dataList: datas.DefaultData.businessList,
firstTab: '', firstTab: '',
now: new Date().format('yyyy-MM-dd hh:mm:ss'), now: new Date().format('yyyy-MM-dd hh:mm:ss'),
isFirst: true currentMenu: 'home'
} }
}, },
mounted() { mounted() {
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
jump(val) { jump(val) {
console.log(val) console.log(val)
let _val = val let _val = val
this.isFirst = val === 'home' this.currentMenu = val
if (val === 'home') _val = this.firstTab.value if (val === 'home') _val = this.firstTab.value
this.$bus.$emit('selectVal', _val) this.$bus.$emit('selectVal', _val)
} }
...@@ -111,8 +111,9 @@ export default { ...@@ -111,8 +111,9 @@ export default {
&-item { &-item {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
height: 4.44vh; height: 4.44vh;
padding: 0 1.36vw; // padding: 0 1.36vw;
box-sizing: border-box; box-sizing: border-box;
margin-right: 0.56vw; margin-right: 0.56vw;
border: 2px solid; border: 2px solid;
...@@ -122,6 +123,14 @@ export default { ...@@ -122,6 +123,14 @@ export default {
} }
.first-tab { .first-tab {
position: relative; position: relative;
width: 16.94vw;
box-sizing: border-box;
&.active {
background-image: url('../assets/images/first-tab-bg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
border: none;
}
.arrow-down { .arrow-down {
margin-left: 0.28vw; margin-left: 0.28vw;
width: 1.39vw; width: 1.39vw;
...@@ -131,5 +140,15 @@ export default { ...@@ -131,5 +140,15 @@ export default {
left: -2px; left: -2px;
} }
} }
.other-tab{
width: 7.22vw;
box-sizing: border-box;
&.active {
background-image: url('../assets/images/other-tab-bg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
border: none;
}
}
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!