<template>
  <el-tabs v-model="activeName" @tab-change="handChange">
    <el-tab-pane label="阅读记录" name="readLog">
      <readLogTable v-if="activeName == 'readLog'" :primary="props.primary"></readLogTable>
    </el-tab-pane>

    <el-tab-pane label="充值记录" name="recharge">
      <rechargeTable v-if="activeName == 'recharge'" :primary="props.primary"></rechargeTable>
    </el-tab-pane>

    <el-tab-pane label="消耗记录" name="consume">
      <consumeTable v-if="activeName == 'consume'" :primary="props.primary"></consumeTable>
    </el-tab-pane>
  </el-tabs>
</template>

<script lang="ts" setup>
import { wechatMinUserInfo } from '@/api/orders/index';
import { useGetList } from '@/hook/curd/useGetList';
import rechargeTable from './tables/recharge.vue'
import consumeTable from './tables/consume.vue'
import readLogTable from './tables/readLog.vue'
import {getUserInfo} from "@/api/customer/audience"
import { ref } from 'vue'
import type { TabsPaneContext } from 'element-plus'
const props = defineProps({
  primary: Object,
});


const activeName = ref('readLog')

const handChange = (tab: TabsPaneContext, event: Event) => {
  activeName.value = tab
}
onMounted(() => {
	console.log("111111111111111111",props.primary);
})

</script>

<style lang="scss" scoped>
.wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;

  .row {
    width: 100%;
    display: flex;

    .item {
      margin: 9px;

      .label {
        font-size: 16px;
      }

      .content {
        font-size: 18px;
        font-weight: 600;
      }
    }
  }

}
</style>
