<template>
  <van-tabs v-model="active" @click-tab="onClickTab">
    <van-tab title="当前">
      <current-component></current-component>
    </van-tab>
    <van-tab title="历史">
      <history-component></history-component>
    </van-tab>
  </van-tabs>
</template>
<script setup>
import { ref } from "vue";
import CurrentComponent from "./current.vue";
import HistoryComponent from "./history.vue";
import { showToast } from 'vant';

const active = ref('当前');
const onClickTab = ({ title }) => showToast(title);
</script>
<style lang="scss">
.van-tabs {
  height: 100%;
}

.van-tabs__content {
  height: calc(100% - 44px);

  .van-tab__panel {
    height: 100% !important;
  }

}
</style>
