refactor: 首页图标调整

This commit is contained in:
caiyuchao
2025-08-12 19:00:06 +08:00
parent d4f555b759
commit d158a43fb4
3 changed files with 21 additions and 4 deletions

View File

@@ -8,7 +8,6 @@ import {
CardHeader,
CardTitle,
VbenCountToAnimator,
VbenIcon,
} from '@vben-core/shadcn-ui';
interface Props {
@@ -25,7 +24,7 @@ withDefaults(defineProps<Props>(), {
</script>
<template>
<div class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-4">
<div class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-5">
<template v-for="item in items" :key="item.title">
<Card :title="item.title" class="w-full">
<CardHeader>
@@ -39,7 +38,8 @@ withDefaults(defineProps<Props>(), {
class="text-xl"
prefix=""
/>
<VbenIcon :icon="item.icon" class="size-8 flex-shrink-0" />
<!-- <VbenIcon :icon="item.icon" class="size-8 flex-shrink-0" /> -->
<span :class="item.icon"></span>
</CardContent>
<CardFooter class="justify-between">
<span>{{ item.totalTitle }}</span>

View File

@@ -23,6 +23,8 @@ interface WorkbenchTrendItem {
content: string;
date: string;
title: string;
status: any;
info: string;
}
interface WorkbenchTodoItem {

View File

@@ -43,7 +43,22 @@ withDefaults(defineProps<Props>(), {
/>
<div class="min-w-0 flex-auto">
<p class="text-foreground text-sm font-semibold leading-6">
{{ item.title }}
<span
class="text-foreground mr-2 text-sm font-semibold leading-6"
>{{ item.title }}
</span>
<a-tag
v-if="item.status"
:color="
item.status.colorType
? item.status.colorType
: item.status.cssClass
"
>
{{ item.status.label }}
</a-tag>
<!-- eslint-disable vue/no-v-html -->
<span v-html="item.info"></span>
</p>
<!-- eslint-disable vue/no-v-html -->
<p