Vue.js 遍历数组并显示 item.file 的 name 内容
为了单独显示 item.file 的 name,可以在遍历的过程中直接访问 item.file.name。修改后的代码如下:
<span v-for="(item, index) in arr" :key="index" style="font-weight: 350">
<a-col :span="24">
<input type="checkbox" checked disabled>{{ item.handoverCategory }}——
<span style="font-weight: 350">{{ item.handoverContent }}</span>——
<span style="font-weight: 350">{{ item.file.name }}</span>
</a-col>
</span>
这样就可以单独显示 item.file 的 name 了。
原文地址: https://www.cveoy.top/t/topic/ecGx 著作权归作者所有。请勿转载和采集!