ViewEquity.vue 1.51 KB
<!--
 * @Description: 2.1 会员权益内容页面
 * @Author: huyue
 * @Date: 2023-07-04 13:55:35
 * @LastEditors: huyue
 * @LastEditTime: 2023-07-06 10:09:59
-->
<template>
  <div class="view-content">
    <TopTab class="top-tab" :tabList="tabList" @tabChange="changeTab">
      <template #right>
        <RightTab :tabActive="tabActive"></RightTab>
      </template>
    </TopTab>
    <template v-if="tabActive == 0">
      <Resident></Resident>
    </template>
    <template v-else-if="tabActive == 1">
      <ExtendWarranty></ExtendWarranty>
    </template>
    <template v-else>
      <Wholesale></Wholesale>
    </template>
  </div>
</template>

<script>
import Resident from '../../equity/Resident.vue'
import Wholesale from '../../equity/Wholesale.vue'
import RightTab from '../../equity/components/RightTab.vue'
import ExtendWarranty from '../../equity/ExtendWarranty.vue'
export default {
  name: 'ViewEquity',
  components: {
    ExtendWarranty,
    Resident,
    Wholesale,
    RightTab
  },
  data() {
    return {
      tabList: ['驻店零售权益', '延保权益', '批发销售权益'],
      tabActive: 0
    }
  },
  mounted() {},
  methods: {
    changeTab(index) {
      this.tabActive = index
    }
  }
}
</script>

<style lang="scss" scoped>
.view-content {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  position: relative;
  padding: 1.78vh 1.67vw;
  gap: 0 16px;
  .top-tab {
    margin-bottom: 1.78vh;
    height: 5vh;
  }
}
</style>