add gallery intro
This commit is contained in:
@@ -28,6 +28,8 @@
|
|||||||
|
|
||||||
<side-view id="gallery-index" right>
|
<side-view id="gallery-index" right>
|
||||||
<template #default="{ hide }">
|
<template #default="{ hide }">
|
||||||
|
<div class="gallery-intro" v-html="intro" />
|
||||||
|
|
||||||
<ul v-if="creations">
|
<ul v-if="creations">
|
||||||
<li v-for="crea in creations" :key="crea.id">
|
<li v-for="crea in creations" :key="crea.id">
|
||||||
<node-view-title
|
<node-view-title
|
||||||
@@ -84,6 +86,12 @@ export default {
|
|||||||
id: { type: [Number, String], default: undefined }
|
id: { type: [Number, String], default: undefined }
|
||||||
},
|
},
|
||||||
|
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
intro: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['creations', 'creation'])
|
...mapGetters(['creations', 'creation'])
|
||||||
},
|
},
|
||||||
@@ -107,6 +115,9 @@ export default {
|
|||||||
|
|
||||||
created () {
|
created () {
|
||||||
this.$store.dispatch('INIT_GALLERY', parseInt(this.id))
|
this.$store.dispatch('INIT_GALLERY', parseInt(this.id))
|
||||||
|
this.$store.dispatch('QUERY_PAGE', 'gallery').then(page => {
|
||||||
|
this.intro = page.content
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ export default {
|
|||||||
ids: {
|
ids: {
|
||||||
welcome: 263,
|
welcome: 263,
|
||||||
intro: 264,
|
intro: 264,
|
||||||
kit: 265
|
kit: 265,
|
||||||
|
gallery: 349
|
||||||
},
|
},
|
||||||
visited: localStorage.getItem('visited') === 'true'
|
visited: localStorage.getItem('visited') === 'true'
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user