show map on gallery and change name
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
{{ $t('map') }}
|
||||
</b-button>
|
||||
|
||||
<side-view id="gallery-map-side">
|
||||
<side-view id="gallery-map-side" :visible="mapIsVisible">
|
||||
<template #default="{ hide, visible }">
|
||||
<gallery-map
|
||||
v-if="creations && creation"
|
||||
@@ -100,7 +100,8 @@ export default {
|
||||
|
||||
data () {
|
||||
return {
|
||||
intro: ''
|
||||
intro: '',
|
||||
mapIsVisible: false
|
||||
}
|
||||
},
|
||||
|
||||
@@ -126,6 +127,9 @@ export default {
|
||||
},
|
||||
|
||||
created () {
|
||||
if (this.$route.hash === '#map') {
|
||||
this.mapIsVisible = true
|
||||
}
|
||||
this.$store.dispatch('INIT_GALLERY', parseInt(this.id))
|
||||
this.$store.dispatch('QUERY_PAGE', 'gallery').then(page => {
|
||||
this.intro = page.content
|
||||
|
||||
@@ -87,6 +87,11 @@ export default {
|
||||
|
||||
created () {
|
||||
this.setDots()
|
||||
if (this.visible) {
|
||||
this.$nextTick().then(() => {
|
||||
this.defineSize()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user