review:【antd】【iot】首页的迁移
This commit is contained in:
@@ -16,6 +16,7 @@ defineOptions({ name: 'ComparisonCard' });
|
||||
|
||||
const props = defineProps<ComparisonCardProps>();
|
||||
|
||||
// TODO @haohao:看看能不能用中立的 icon,类似 ADD、EDIT 那种。目的:方便后续迁移到 ele 版本里。
|
||||
const iconMap: Record<string, string> = {
|
||||
menu: 'ant-design:appstore-outlined',
|
||||
box: 'ant-design:box-plot-outlined',
|
||||
@@ -39,11 +40,7 @@ const iconName = computed(() => iconMap[props.icon] || iconMap.menu);
|
||||
</span>
|
||||
<span class="text-3xl font-bold text-gray-800">
|
||||
<span v-if="value === -1">--</span>
|
||||
<VbenCountToAnimator
|
||||
v-else
|
||||
:end-val="value"
|
||||
:duration="1000"
|
||||
/>
|
||||
<VbenCountToAnimator v-else :end-val="value" :duration="1000" />
|
||||
</span>
|
||||
</div>
|
||||
<div :class="`text-4xl ${iconColor || ''}`">
|
||||
@@ -63,4 +60,3 @@ const iconName = computed(() => iconMap[props.icon] || iconMap.menu);
|
||||
</CardContent>
|
||||
</Card>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// add by 芋艿:对比卡片,目前 iot 模块在使用
|
||||
export { default as ComparisonCard } from './comparison-card.vue';
|
||||
export * from './types';
|
||||
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
export interface ComparisonCardProps {
|
||||
/** 图标名称 */
|
||||
icon: string;
|
||||
/** 图标颜色类名 */
|
||||
iconColor?: string;
|
||||
/** 加载状态 */
|
||||
loading?: boolean;
|
||||
/** 标题 */
|
||||
title: string;
|
||||
/** 今日新增数量 */
|
||||
todayCount: number;
|
||||
/** 数值 */
|
||||
value: number;
|
||||
icon: string; // 图标名称
|
||||
iconColor?: string; // 图标颜色类名
|
||||
loading?: boolean; // 加载状态
|
||||
title: string; // 标题
|
||||
todayCount: number; // 今日新增数量
|
||||
value: number; // 数值
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user