style: color of offline device count
This commit is contained in:
@@ -8,13 +8,11 @@ import axios from 'axios';
|
|||||||
import { NCard, NStatistic, NTag, NGrid, NGi, NButton, NIcon, useThemeVars, NSpace, NTooltip } from 'naive-ui';
|
import { NCard, NStatistic, NTag, NGrid, NGi, NButton, NIcon, useThemeVars, NSpace, NTooltip } from 'naive-ui';
|
||||||
import { toRefs, computed } from 'vue';
|
import { toRefs, computed } from 'vue';
|
||||||
|
|
||||||
interface Props {
|
const props = defineProps<{
|
||||||
station: Station;
|
station: Station;
|
||||||
stationDevices?: StationDevices;
|
stationDevices?: StationDevices;
|
||||||
stationAlarmCounts?: StationAlarmCounts;
|
stationAlarmCounts?: StationAlarmCounts;
|
||||||
}
|
}>();
|
||||||
|
|
||||||
const props = defineProps<Props>();
|
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
'open-offline-device-detail-modal': [station: Station];
|
'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>
|
<span class="font-xx-small" :class="[station.online ? 'clickable' : '']" @click="openOfflineDeviceTreeModal">离线设备</span>
|
||||||
</template>
|
</template>
|
||||||
<template #default>
|
<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>
|
<span class="font-small">/{{ deviceCount }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
|
|||||||
Reference in New Issue
Block a user