Merge branch 'main' into vue-3
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
class="w-full inline-flex flex-nowrap overflow-hidden [mask-image:_linear-gradient(to_right,transparent_0,_black_128px,_black_calc(100%-128px),transparent_100%)]"
|
||||
>
|
||||
<ul ref="templates-slider" class="flex justify-center md:justify-start animate-infinite-scroll">
|
||||
<li v-for="(template, i) in templates" :key="template.id" class="mx-4 w-72 h-auto">
|
||||
<li v-for="(template, i) in sliderTemplates" :key="template.id" class="mx-4 w-72 h-auto">
|
||||
<single-template :slug="template.slug" />
|
||||
</li>
|
||||
</ul>
|
||||
@@ -48,7 +48,10 @@ export default {
|
||||
computed: {
|
||||
...mapState({
|
||||
templates: state => state['open/templates'].content
|
||||
})
|
||||
}),
|
||||
sliderTemplates () {
|
||||
return this.templates.slice(0, 20)
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
@@ -62,8 +65,8 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
store.dispatch('open/templates/loadWithLimit', 10)
|
||||
mounted() {
|
||||
store.dispatch('open/templates/loadAll', { limit: 20 })
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user