<template>
  <div>
    <el-tabs v-model="tabIndex">
      <el-tab-pane label="会员用户" :name="1" v-if="checkPermi(['customer:applet:vip:vip-user'])">
        <VipUser v-if="tabIndex == 1" />
      </el-tab-pane>
      <el-tab-pane label="会员类型" :name="2" v-if="checkPermi(['customer:applet:vip:vip-type'])">
        <VipType v-if="tabIndex == 2" />
      </el-tab-pane>
      <!-- <el-tab-pane
        label="会员折扣"
        :name="3"
        v-if="checkPermi(['customer-applet:vip:vip-discount'])"
      >
        <VipDiscount v-if="tabIndex == 3" />
      </el-tab-pane>
      <el-tab-pane
        label="用户折扣"
        :name="4"
        v-if="checkPermi(['customer-applet:vip:user-discount'])"
      >
        <UserDiscount v-if="tabIndex == 4" />
      </el-tab-pane> -->
      <el-tab-pane label="充值记录" :name="5" v-if="checkPermi(['customer:applet:vip:recharge'])">
        <Recharge v-if="tabIndex == 5" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script setup name="Vip">
import { checkPermi } from '@/utils/permission'
// import UserDiscount from './components/UserDiscount.vue'
// import VipDiscount from './components/VipDiscount.vue'
import VipType from './components/VipType.vue'
import VipUser from './components/VipUser.vue'
import Recharge from './components/Recharge.vue'

const tabIndex = ref(1)
</script>

<style lang="scss" scoped></style>
