Commit 8759ae2f by 胡悦

修改头部组件

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