You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.0 KiB

<script setup lang="ts">
import { nextTick, ref } from 'vue';
import StatPane from './components/StatPane.vue';
// area=各区域 field=各领域
const activeTab = ref<'area' | 'field'>('area');
/** 页签切换后通知表格重新计算高度(懒加载/隐藏页签中的 ECharts 式尺寸需要重算) */
const handleTabChange = () => {
nextTick(() => {
window.dispatchEvent(new Event('resize'));
});
};
</script>
<template>
<div class="app-container">
<el-tabs v-model="activeTab" type="border-card" @tab-change="handleTabChange">
<el-tab-pane label="各区域" name="area" lazy>
<StatPane dimension="area" />
</el-tab-pane>
<el-tab-pane label="各领域" name="field" lazy>
<StatPane dimension="field" />
</el-tab-pane>
</el-tabs>
</div>
</template>
<style scoped lang="scss">
.app-container {
padding: 16px;
}
/* 卡片式页签(与 efcode/report/registration/index.vue 保持一致) */
:deep(.el-tabs--border-card) {
box-shadow: none;
}
</style>