This commit is contained in:
taehoon 2019-04-04 00:00:21 -04:00
parent 792ae1697e
commit 32035217b8
4 changed files with 8 additions and 17 deletions

View file

@ -18,7 +18,7 @@ export default {
}, },
getKey: { getKey: {
type: Function, type: Function,
default: item => item default: item => item.id
} }
} }
} }

View file

@ -6,16 +6,7 @@ const SelectableList = {
List, List,
Checkbox Checkbox
}, },
props: { props: List.props,
items: {
type: Array,
default: () => []
},
getKey: {
type: Function,
default: item => item
}
},
data () { data () {
return { return {
selected: [] selected: []

View file

@ -16,14 +16,14 @@
<div :label="$t('user_card.followees')" v-if="followsTabVisible" :disabled="!user.friends_count"> <div :label="$t('user_card.followees')" v-if="followsTabVisible" :disabled="!user.friends_count">
<FriendList :userId="userId"> <FriendList :userId="userId">
<template slot="item" scope="p"> <template slot="item" scope="p">
<FollowCard :key="p.item.id" :user="p.item" /> <FollowCard :user="p.item" />
</template> </template>
</FriendList> </FriendList>
</div> </div>
<div :label="$t('user_card.followers')" v-if="followersTabVisible" :disabled="!user.followers_count"> <div :label="$t('user_card.followers')" v-if="followersTabVisible" :disabled="!user.followers_count">
<FollowerList :userId="userId"> <FollowerList :userId="userId">
<template slot="item" scope="p"> <template slot="item" scope="p">
<FollowCard :key="p.item.id" :user="p.item" :noFollowsYou="isUs" /> <FollowCard :user="p.item" :noFollowsYou="isUs" />
</template> </template>
</FollowerList> </FollowerList>
</div> </div>

View file

@ -200,9 +200,9 @@
<BlockCard slot-scope="row" :userId="row.item"/> <BlockCard slot-scope="row" :userId="row.item"/>
</Autosuggest> </Autosuggest>
</div> </div>
<BlockList :refresh="true"> <BlockList :refresh="true" :getKey="item => item">
<template slot="item" scope="p"> <template slot="item" scope="p">
<BlockCard :key="p.item" :userId="p.item" /> <BlockCard :userId="p.item" />
</template> </template>
<template slot="empty">{{$t('settings.no_blocks')}}</template> <template slot="empty">{{$t('settings.no_blocks')}}</template>
</BlockList> </BlockList>
@ -214,9 +214,9 @@
<MuteCard slot-scope="row" :userId="row.item"/> <MuteCard slot-scope="row" :userId="row.item"/>
</Autosuggest> </Autosuggest>
</div> </div>
<MuteList :refresh="true"> <MuteList :refresh="true" :getKey="item => item">
<template slot="item" scope="p"> <template slot="item" scope="p">
<MuteCard :key="p.item" :userId="p.item" /> <MuteCard :userId="p.item" />
</template> </template>
<template slot="empty">{{$t('settings.no_mutes')}}</template> <template slot="empty">{{$t('settings.no_mutes')}}</template>
</MuteList> </MuteList>