add title and alt for avatars, fix console errors in avatarlist

This commit is contained in:
shpuld 2019-05-01 17:33:56 +03:00
parent a954f56e34
commit c44c048356
10 changed files with 33 additions and 19 deletions

View file

@ -1,10 +1,10 @@
import UserAvatar from '../user_avatar/user_avatar.vue'
const AvatarList = {
props: ['avatars'],
props: ['users'],
computed: {
slicedAvatars () {
return this.avatars ? this.avatars.slice(0, 15) : []
slicedUsers () {
return this.users ? this.users.slice(0, 15) : []
}
},
components: {

View file

@ -1,7 +1,7 @@
<template>
<div class="avatars">
<div class="avatars-item" v-for="avatar in slicedAvatars">
<UserAvatar :src="avatar.profile_image_url" class="avatar-small" />
<div class="avatars-item" v-for="user in slicedUsers">
<UserAvatar :user="user" class="avatar-small" />
</div>
</div>
</template>