优化组件

This commit is contained in:
Sun 2024-01-05 13:58:58 +08:00
parent 0d0421c8eb
commit 3a82949afc
2 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ interface Prop {
textColor?: string
cardTypeStyle: PanelPanelConfigStyleEnum
// monitorType: string
icon: string
icon?: string
class?: string
backgroundColor?: string
}
@ -40,7 +40,7 @@ const propClass = ref(props.class)
<div class="w-[60px] h-[70px]">
<div class="w-[60px] h-full flex items-center justify-center text-white">
<slot name="icon">
<SvgIcon :icon="icon" style="width: 35px;height: 35px;" :style="{ color: textColor }" />
<SvgIcon :icon="icon ?? ''" style="width: 35px;height: 35px;" :style="{ color: textColor }" />
</slot>
</div>
</div>

View File

@ -19,7 +19,7 @@ defineProps<Prop>()
<template>
<div class="w-full">
<div v-if="cardTypeStyle === PanelPanelConfigStyleEnum.info">
<div class="mb-1" :style="{ color: textColor }">
<div class="mb-1 text-xs" :style="{ color: textColor }">
<span>
{{ infoCardLeftText }}
</span>