wms-antdvue/.svn/pristine/5c/5caaaabb46e2273b6306ab928c58fd8aba0790b1.svn-base
2024-11-07 16:33:03 +08:00

43 lines
911 B
Plaintext

<template>
<div class="mt-4">
<a-row :gutter="24">
<a-col :span="24">
<a-card
:bordered="false"
:tab-list="tabList"
:active-tab-key="activeKey"
@tab-change="(key) => onTabChange(key, 'key')"
>
<template v-if="activeKey === '1'">
<FluxTrend />
</template>
<template v-if="activeKey === '2'">
<VisitAmount />
</template>
</a-card>
</a-col>
</a-row>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import FluxTrend from './FluxTrend.vue';
import VisitAmount from './VisitAmount.vue';
const activeKey = ref('1');
const tabList = [
{
key: '1',
tab: '流量趋势',
},
{
key: '2',
tab: '访问量',
},
];
function onTabChange(value: string) {
activeKey.value = value;
}
</script>