Add component's lazy loading

This commit is contained in:
2020-12-08 12:40:16 +01:00
parent 73b7786d1a
commit 2a1cf5ae8f
7 changed files with 31 additions and 36 deletions

View File

@@ -30,12 +30,11 @@
<script>
import { mapState } from "vuex";
import ImageSkeleton from "./ImageSkeleton";
export default {
name: "ImageUnsplash",
components: {
ImageSkeleton
ImageSkeleton: () => import("./ImageSkeleton")
},
props: {
containerClass: {

View File

@@ -15,13 +15,12 @@
<script>
import { mapState } from "vuex";
import GridItemSkeleton from "./GridItemSkeleton";
import GridItem from "./GridItem";
export default {
name: "Grid",
components: {
GridItemSkeleton,
GridItem
GridItem: () => import("./GridItem")
},
props: {
data: Array

View File

@@ -21,11 +21,10 @@
<script>
import { mapState } from "vuex";
import DeleteItem from "./DeleteItem";
export default {
name: "GridItem",
components: { DeleteItem },
components: { DeleteItem: () => import("./DeleteItem") },
props: {
item: Object
},