<template>
  <a-tabs v-model:activeKey="activeKey" @change="handleTabChange">
    <a-tab-pane key="1" tab="全部"> 
      <all />
    </a-tab-pane>
    <a-tab-pane key="2" tab="用电量" force-render> </a-tab-pane>
    <a-tab-pane key="3" tab="用水量"> </a-tab-pane>
    <a-tab-pane key="4" tab="供水量"> </a-tab-pane>
    <a-tab-pane key="5" tab="碳排"> </a-tab-pane>
    <a-tab-pane key="6" tab="供热量"> </a-tab-pane>
  </a-tabs>
</template>
<script lang="ts" setup>
  import { ref } from 'vue';
  import all from './all/index.vue';
  defineOptions({
    name: 'carbonPlanning', // 与页面路由name一致缓存才可生效
  });
  const activeKey = ref('1');
  // 切换tab页的回调
  const handleTabChange = (key) => {
    console.log('Tab changed:', key);
  };
</script>
