fix(device-common-card): render condition

This commit is contained in:
yangsy
2025-11-12 15:37:53 +08:00
parent a5a6ff9dbe
commit 098a315153

View File

@@ -8,11 +8,13 @@ const props = defineProps<{
const { commonInfo } = toRefs(props);
const cardShow = computed(() => !!commonInfo.value && Object.keys(commonInfo.value).length > 0);
const commonInfoEntries = computed(() => Object.entries(commonInfo.value ?? {}));
</script>
<template>
<NCard v-if="commonInfo" size="small" hoverable>
<NCard v-if="cardShow" size="small" hoverable>
<template #header>
<div>设备信息</div>
</template>