Commit 5d7b2b0c by chenwq

feat(ReportDetail): 优化文本内容展示逻辑,处理空值情况

1 parent 1fa87131
......@@ -38,9 +38,7 @@
<div class="label">
{{ sec.label }}
</div>
<div class="text-content">
{{ itemData[sec.key] || '暂无' }}
</div>
<div class="text-content" v-text="getTextContent(itemData[sec.key])" />
</template>
</div>
</div>
......@@ -145,6 +143,11 @@ export default {
return val.split(",").filter(Boolean);
return [];
},
getTextContent(val) {
if (val === null || val === undefined || val === "")
return "暂无";
return String(val);
},
},
};
</script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!