Commit eaefd5590249acfb657482f5a114b0aa0d9f5b44
1 parent
cac563fc
van-image异常图片处理
Showing
2 changed files
with
8 additions
and
2 deletions
src/components/palaceGrid/palaceGrid.vue
| @@ -10,7 +10,11 @@ | @@ -10,7 +10,11 @@ | ||
| 10 | fit="cover" | 10 | fit="cover" |
| 11 | lazy-load | 11 | lazy-load |
| 12 | :src="item.img || item" | 12 | :src="item.img || item" |
| 13 | - /> | 13 | + > |
| 14 | + <template v-slot:error> | ||
| 15 | + <img class="img" v-lazy="users.logo || item" alt=""/> | ||
| 16 | + </template> | ||
| 17 | + </van-image> | ||
| 14 | <div v-if="index<8&&item.v === true" class="play_box"> | 18 | <div v-if="index<8&&item.v === true" class="play_box"> |
| 15 | <img src="static/img/play.png" /> | 19 | <img src="static/img/play.png" /> |
| 16 | </div> | 20 | </div> |
src/components/userAvatarBox/userAvatarBox.vue
| @@ -7,7 +7,9 @@ | @@ -7,7 +7,9 @@ | ||
| 7 | fit="cover" | 7 | fit="cover" |
| 8 | lazy-load | 8 | lazy-load |
| 9 | :src="users.logo || item" | 9 | :src="users.logo || item" |
| 10 | - /> | 10 | + > |
| 11 | + <template v-slot:error><img class="avatar-img" v-lazy="users.logo || item" alt=""/></template> | ||
| 12 | + </van-image> | ||
| 11 | </div> | 13 | </div> |
| 12 | <div class="nickname"> | 14 | <div class="nickname"> |
| 13 | {{users.title}} | 15 | {{users.title}} |