Merge branch 'feature/GFRS-597【电投页面优化】' into dev

This commit is contained in:
yuweiqi
2020-03-18 19:45:41 +08:00
2 changed files with 26 additions and 15 deletions

View File

@@ -1,15 +1,17 @@
<template>
<div class="ml6 mr6 pt5 pb5">
<ul class="index-bar">
<li @click="changePage(Number(index) + 1)" v-for="(item, index) in pageTitle" :key="item.pageNo" :class="item.tabClass">
<li @click="changePage(Number(index) + 1)" v-for="(item, index) in pageTitle" :key="index" :class="item.tabClass">
<div :class="[{ activeline: item.tabClass }, { 'bg-gray': !item.tabClass }, 'w20', 'h2']"></div>
<span>{{ item.pageNo }}.{{ item.pageItem }}</span>
<van-icon name="arrow" size="18" />
<div :class="[{ activeline: item.tabClass }, { 'bg-gray': !item.tabClass }, 'w20', 'h2']"></div>
<van-icon name="arrow" size="12" v-if="index != 7" />
</li>
</ul>
</div>
</template>
<script>
import { Field, Popup, Picker, Icon } from 'vant'
import { Icon } from 'vant'
export default {
name: 'IndexBar',
props: {
@@ -29,13 +31,9 @@ export default {
valueKey: {
type: String,
default: 'text'
},
keyId: {}
}
},
components: {
[Field.name]: Field,
[Popup.name]: Popup,
[Picker.name]: Picker,
[Icon.name]: Icon
},
data() {
@@ -121,6 +119,12 @@ export default {
font-size: 15px;
margin-top: 8px;
}
.index-bar li {
display: flex;
align-items: center;
}
.index-bar::-webkit-scrollbar {
display: none;
}
@@ -134,4 +138,7 @@ li {
.active {
color: #e9332e;
}
.activeline {
background: #e9332e;
}
</style>