gtsoft-snail-job-admin/src/views/home/index.vue

29 lines
700 B
Vue
Raw Normal View History

2024-03-08 17:59:45 +08:00
<script setup lang="ts">
2024-04-12 23:46:09 +08:00
import { ref } from 'vue';
2024-03-22 11:22:07 +08:00
import { fetchCardCount } from '@/service/api';
2024-03-08 17:59:45 +08:00
import CardData from './modules/card-data.vue';
2024-03-28 16:22:18 +08:00
import RetryTab from './modules/retry-tab.vue';
2024-03-21 10:57:53 +08:00
2024-03-22 11:22:07 +08:00
const cardCount = ref<Api.Dashboard.CardCount>();
const getCardData = async () => {
const { data: cardData, error } = await fetchCardCount();
if (!error) {
cardCount.value = cardData;
}
};
getCardData();
2024-03-08 17:59:45 +08:00
</script>
<template>
2024-03-21 10:57:53 +08:00
<NSpace vertical :size="16">
2024-04-12 23:46:09 +08:00
<CardData v-model="cardCount!" />
<NCard :bordered="false" class="card-wrapper p-t-136px 2xl:p-t-0 lg:p-t-36px md:p-t-90px">
<RetryTab v-model="cardCount!" />
2024-03-28 16:22:18 +08:00
</NCard>
2024-03-21 10:57:53 +08:00
</NSpace>
2024-03-08 17:59:45 +08:00
</template>
<style scoped></style>