📅  最后修改于: 2022-03-11 14:55:32.329000             🧑  作者: Mango
//store/getters.js
usersForMember: (state) => (member) => {
return state.users.data.filter(u => u.member_id === member.id)
}
//someComponent.vue
computed: {
...mapGetters({usersForMember: 'users/usersForMember'}),
}
//To use
this.usersFormMember(21);