算法广场和能力广场容错处理pic为空

This commit is contained in:
guoyue 2022-10-27 13:50:29 +08:00
parent 3e1b6b8a22
commit e29e0f0526
2 changed files with 3 additions and 2 deletions

View File

@ -106,7 +106,8 @@ const algorithmCardPhoto = (item) => {
if(item.pic && typeof item.pic == 'string') {
_arr = JSON.parse(item.pic)
}
let _img = _arr[0] && _arr[0].img || ''
let _img = _arr[0] && _arr[0].img || imgSrc.value;
console.log('_img------------>', _img);
return _img
}
//

View File

@ -30,7 +30,7 @@
</div>
<div class="algorithm-class">
<div v-for="(item, index) in dataList" :key="`algorithm-${index}`" class="algorithm-card">
<a-image :src="item.pic" :width="525" :height="275" :fallback="imgSrc"
<a-image :src="item.pic || imgSrc" :width="525" :height="275" :fallback="imgSrc"
:preview="false"></a-image>
<a-tooltip>