yandere_fe/src/components/status_popover/status_popover.js

35 lines
647 B
JavaScript
Raw Normal View History

import { find } from 'lodash'
const StatusPopover = {
name: 'StatusPopover',
props: [
'statusId'
],
data () {
return {
popperOptions: {
modifiers: {
preventOverflow: { padding: { top: 50 }, boundariesElement: 'viewport' }
}
}
}
},
2019-10-24 19:14:53 -07:00
computed: {
status () {
return find(this.$store.state.statuses.allStatuses, { id: this.statusId })
}
},
components: {
Status: () => import('../status/status.vue')
},
methods: {
enter () {
2019-10-24 19:14:53 -07:00
if (!this.status) {
2019-10-24 19:21:33 -07:00
this.$store.dispatch('fetchStatus', this.statusId)
}
}
}
}
export default StatusPopover