fix: 修复设备硬件占用率卡片中showCard计算属性未获取原始值的问题

This commit is contained in:
yangsy
2026-01-13 13:49:24 +08:00
parent bd6ad9b932
commit 045f7a9a81

View File

@@ -17,7 +17,7 @@ const props = defineProps<{
const { cpuUsage, memUsage, diskUsage, runningTime, cpuUsageLabel, memUsageLabel, diskUsageLabel, runningTimeLabel } = toRefs(props); const { cpuUsage, memUsage, diskUsage, runningTime, cpuUsageLabel, memUsageLabel, diskUsageLabel, runningTimeLabel } = toRefs(props);
const showCard = computed(() => { const showCard = computed(() => {
return Object.values({ cpuUsage, memUsage, diskUsage, runningTime }).some((value) => !!value); return Object.values({ cpuUsage, memUsage, diskUsage, runningTime }).some((refValue) => !!refValue.value);
}); });
const cpuPercent = computed(() => { const cpuPercent = computed(() => {