| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <template>
- <view class="tab-title">
- <view class="tab-title">
- <view class="tab_box rx-sc">
- <view class="tab_item" v-for="(item, index) in tabList" :key="index" v-text="item.label"
- :class="{active: pickTabIndex == index}" @click="changeChartsTab(index)"></view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- pickTabIndex: 0,
- tabList: [{
- value: '',
- label: '全部'
- },
- {
- value: 0,
- label: '待审核'
- },
- {
- value: 1,
- label: '审核中'
- },
- {
- value: 2,
- label: '已审核'
- }
- ]
- }
- },
- methods: {
- //切换tab
- changeChartsTab(index) {
- this.pickTabIndex = index
- this.$emit('change', this.tabList[index].value)
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .tab-title {
- display: flex;
- align-items: center;
- background-color: #fff;
- position: relative;
- .tab_box {
- width: 100%;
- height: 68rpx;
- position: relative;
- }
- .tab_item {
- height: 68rpx;
- line-height: 68rpx;
- padding: 0 20rpx;
- font-size: 32rpx;
- // color: #979C9E;
- }
- .active {
- box-sizing: border-box;
- border-bottom: 6rpx solid $theme-color;
- color: $theme-color;
- }
- }
- </style>
|