gancio-upstream/components/Announcement.vue

21 lines
478 B
Vue
Raw Normal View History

<template lang="pug">
2020-08-16 14:06:21 +02:00
nuxt-link(:to='`/announcement/${announcement.id}`')
2020-10-07 10:04:56 +02:00
v-alert.mb-1(border='left' type='info' color="primary" show-icon) {{announcement.title}}
</template>
<script>
import { mapState } from 'vuex'
export default {
props: {
announcement: { type: Object, default: () => ({}) }
},
computed: {
...mapState(['announcements']),
description () {
2020-06-22 19:15:32 +02:00
return this.announcement.announcement.replace(/(<br>)+/g, '<br>')
}
}
}
</script>