fix(device-common-card): render condition
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user