34 lines
621 B
Vue
34 lines
621 B
Vue
<template>
|
|
<section class="py-4">
|
|
<img
|
|
class="w-full max-w-md mx-auto mb-8"
|
|
src="~/assets/images/logo.png"
|
|
alt="Studio Ghibli"
|
|
/>
|
|
<Grid :dataSource="films" />
|
|
</section>
|
|
</template>
|
|
|
|
<script>
|
|
import Grid from "@/components/Grid";
|
|
import { mapGetters } from "vuex";
|
|
|
|
export default {
|
|
name: "Films",
|
|
components: { Grid },
|
|
head: {
|
|
titleTemplate: "%s - Films"
|
|
},
|
|
async asyncData({ store }) {
|
|
if (!store.state.films.list.length) await store.dispatch("films/getList");
|
|
},
|
|
computed: {
|
|
...mapGetters({
|
|
films: "films/list"
|
|
})
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style></style>
|