style: color of offline device count

This commit is contained in:
yangsy
2025-09-09 15:24:48 +08:00
parent fa615fdb7b
commit 3ed691aee0

View File

@@ -8,13 +8,11 @@ import axios from 'axios';
import { NCard, NStatistic, NTag, NGrid, NGi, NButton, NIcon, useThemeVars, NSpace, NTooltip } from 'naive-ui';
import { toRefs, computed } from 'vue';
interface Props {
const props = defineProps<{
station: Station;
stationDevices?: StationDevices;
stationAlarmCounts?: StationAlarmCounts;
}
const props = defineProps<Props>();
}>();
const emit = defineEmits<{
'open-offline-device-detail-modal': [station: Station];
@@ -131,7 +129,7 @@ const theme = useThemeVars();
<span class="font-xx-small" :class="[station.online ? 'clickable' : '']" @click="openOfflineDeviceTreeModal">离线设备</span>
</template>
<template #default>
<span class="font-small" :style="{ color: offlineDeviceCount > 0 ? 'red' : '' }">{{ offlineDeviceCount }}</span>
<span class="font-small" :style="{ color: offlineDeviceCount > 0 ? theme.errorColor : theme.successColor }">{{ offlineDeviceCount }}</span>
<span class="font-small">/{{ deviceCount }}</span>
</template>
<template #suffix>