mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 首页更新
This commit is contained in:
@ -1,55 +1,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<n-space>
|
||||
<n-card v-for="item in cardData" :key="item.title" :title="item.title">
|
||||
<template #header-extra>
|
||||
<n-tag :type="item.color">{{ item.action }}</n-tag>
|
||||
</template>
|
||||
</n-card>
|
||||
</n-space>
|
||||
<div class="p-10px">
|
||||
<data-card :loading="loading" />
|
||||
<nav-card :loading="loading" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { NSpace, NCard, NTag } from 'naive-ui';
|
||||
import { ref } from 'vue';
|
||||
import { DataCard, NavCard } from './components';
|
||||
|
||||
interface CardData {
|
||||
title: string;
|
||||
value: number;
|
||||
total: number;
|
||||
color: 'default' | 'primary' | 'warning' | 'success';
|
||||
action: string;
|
||||
}
|
||||
const loading = ref(true);
|
||||
|
||||
const cardData: CardData[] = [
|
||||
{
|
||||
title: '访问数',
|
||||
value: 2000,
|
||||
total: 120000,
|
||||
color: 'default',
|
||||
action: '月'
|
||||
},
|
||||
{
|
||||
title: '成交额',
|
||||
value: 20000,
|
||||
total: 500000,
|
||||
color: 'success',
|
||||
action: '月'
|
||||
},
|
||||
{
|
||||
title: '下载数',
|
||||
value: 8000,
|
||||
total: 120000,
|
||||
color: 'primary',
|
||||
action: '周'
|
||||
},
|
||||
{
|
||||
title: '成交数',
|
||||
value: 5000,
|
||||
total: 50000,
|
||||
color: 'warning',
|
||||
action: '年'
|
||||
}
|
||||
];
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
}, 1500);
|
||||
</script>
|
||||
<style scoped></style>
|
||||
|
Reference in New Issue
Block a user