yandere_fe/src/components/mentions_line/mentions_line.js

39 lines
740 B
JavaScript
Raw Normal View History

import MentionLink from 'src/components/mention_link/mention_link.vue'
import { mapGetters } from 'vuex'
const MentionsLine = {
name: 'MentionsLine',
props: {
mentions: {
required: true,
2021-06-08 07:04:57 -07:00
type: Array
}
},
data: () => ({ expanded: false }),
components: {
MentionLink
},
computed: {
limit () {
return 5
},
mentionsComputed () {
return this.mentions.slice(0, this.limit)
},
extraMentions () {
return this.mentions.slice(this.limit)
},
manyMentions () {
return this.extraMentions.length > 0
},
2021-06-08 04:51:42 -07:00
...mapGetters(['mergedConfig'])
},
methods: {
toggleShowMore () {
this.expanded = !this.expanded
}
}
}
export default MentionsLine