refactor(@vben/web-antd): 移除 CardTitle 组件

移除了 CardTitle 组件及相关样式,直接使用 <span> 标签展示标题。
受影响的主要文件:
- 删除了 card-title.vue 文件
- 更新了 SummaryCard 组件的标题展示方式
- 修改了 TimeSummaryChart组件,用 <span> 替代 CardTitle 组件
pull/178/head
nehc 2025-07-22 10:25:42 +08:00
parent 073dc4c6c5
commit e100dc3f8f
4 changed files with 2 additions and 40 deletions

View File

@ -1,33 +0,0 @@
<script lang="ts" setup>
interface Props {
title: string;
}
defineProps<Props>();
</script>
<template>
<span class="card-title">{{ title }}</span>
</template>
<style scoped>
.card-title {
position: relative;
padding-left: 12px;
font-size: 14px;
font-weight: 600;
}
.card-title::before {
position: absolute;
top: 50%;
left: 0;
display: inline-block;
width: 3px;
height: 14px;
content: '';
background: #1890ff;
border-radius: 2px;
transform: translateY(-50%);
}
</style>

View File

@ -1 +0,0 @@
export { default as CardTitle } from './card-title.vue';

View File

@ -17,7 +17,6 @@ import {
getPurchaseTimeSummary,
} from '#/api/erp/statistics/purchase';
import { getSaleSummary, getSaleTimeSummary } from '#/api/erp/statistics/sale';
import { CardTitle } from '#/components/card';
interface Props {
title: string;
@ -167,7 +166,7 @@ defineExpose({
<template>
<Card>
<template #title>
<CardTitle :title="title" />
<span>{{ title }}</span>
</template>
<!-- 折线图 -->
<EchartsUI ref="chartRef" />

View File

@ -30,10 +30,7 @@ const purchaseChartRef = ref();
<Spin :spinning="loading">
<div class="flex flex-col gap-4">
<!-- 销售/采购的全局统计 -->
<SummaryCard
:sale-summary="saleChartRef?.saleSummary"
:purchase-summary="purchaseChartRef?.purchaseSummary"
/>
<SummaryCard />
<!-- 销售/采购的时段统计 -->
<Row :gutter="16">