keep going with api porting in nuxt

This commit is contained in:
lesion
2019-04-23 13:45:52 +00:00
parent 35fa25c060
commit eed3896396
17 changed files with 191 additions and 136 deletions

View File

@@ -1,12 +1,11 @@
<template lang="pug">
v-calendar#calendar.card(
show-caps
:popover-expanded='true'
:attributes='attributes'
:from-page.sync='page'
is-expanded is-inline)
div(slot='popover', slot-scope='{ customData }')
router-link(:to="`/event/${customData.id}`") {{customData.start_datetime|hour}} - {{customData.title}} @{{customData.place.name}}
//- div(slot='popover', slot-scope='{ customData }')
//- router-link(:to="`/event/${customData.id}`") {{customData.start_datetime|hour}} - {{customData.title}} @{{customData.place.name}}
</template>
<script>
import { mapState, mapActions } from 'vuex'
@@ -40,10 +39,10 @@ export default {
key: event.id,
customData: event,
order: event.start_datetime,
popover: {
slot: 'popover',
visibility: 'hover'
}
// popover: {
// slot: 'popover',
// visibility: 'hover'
// }
}
let color = event.tags && event.tags.length && event.tags[0].color ? event.tags[0].color : 'rgba(170,170,250,0.7)'
@@ -73,7 +72,7 @@ export default {
highlight: {
backgroundColor: '#aaffaa'
},
popover: {label: this.$t('Today')}
// popover: {label: this.$t('Today')}
},
...this.filteredEvents.map(this.eventToAttribute)
]

View File

@@ -1,13 +1,14 @@
<template lang="pug">
b-card(bg-variant='dark' text-variant='white' :class="{ withImg: event.image_path ? true : false }"
@click='$router.push("/event/" + event.id)'
:img-src='imgPath')
strong {{event.title}}
div <v-icon name='clock'/> {{event.start_datetime|datetime}}
//- span <v-icon name='map-marker-alt'/> {{event.place.name}}
br
el-tag.mr-1(:color='tag.color || "grey"' v-for='tag in event.tags' :key='tag.tag'
size='small' @click.stop='addSearchTag(tag)') {{tag.tag}}
nuxt-link(:to='`/event/${event.id}`')
//- @click='$router.push("/event/" + event.id)'
b-card(bg-variant='dark' text-variant='white' :class="{ withImg: event.image_path ? true : false }"
:img-src='imgPath')
strong {{event.title}}
div <v-icon name='clock'/> {{event.start_datetime|datetime}}
//- span <v-icon name='map-marker-alt'/> {{event.place.name}}
br
el-tag.mr-1(:color='tag.color || "grey"' v-for='tag in event.tags' :key='tag.tag'
size='small' @click.stop='addSearchTag(tag)') {{tag.tag}}
</template>
<script>
import { mapState, mapActions } from 'vuex'

View File

@@ -40,7 +40,7 @@ export default {
},
watch: {
filteredEvents() {
// this.$nextTick(this.$refs.magicgrid.positionItems) TOFIX
this.$nextTick(this.$refs.magicgrid.positionItems)
}
}
}