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

33 lines
766 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-05-23 00:53:06 +08:00
import TaskTab from './modules/task-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>
<NSpace vertical :size="16" class="home-main">
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">
2024-05-23 00:53:06 +08:00
<TaskTab 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>
.home-main {
2024-06-07 10:20:29 +08:00
max-height: calc(100vh - 155px);
}
</style>