From 453f8f19ea112b3d2350a1e42f601f0a3ece2deb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vyzaldy=20Andr=C3=A9s=20Sanchez?= Date: Sun, 3 May 2020 20:58:41 -0400 Subject: [PATCH 1/2] virtual-scroller - Installs and configures virtual scroller library --- package.json | 2 ++ src/main.js | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/package.json b/package.json index 13a30a4..64563ee 100644 --- a/package.json +++ b/package.json @@ -10,11 +10,13 @@ }, "dependencies": { "core-js": "^3.6.5", + "intersection-observer": "^0.10.0", "lodash": "^4.17.15", "materialize-css": "^1.0.0-rc.2", "vue": "^2.6.11", "vue-loading-overlay": "^3.3.2", "vue-router": "^3.1.6", + "vue-virtual-scroller": "^1.0.10", "vuex": "^3.3.0" }, "devDependencies": { diff --git a/src/main.js b/src/main.js index 1c5c84b..e3dc7ab 100644 --- a/src/main.js +++ b/src/main.js @@ -1,9 +1,17 @@ +// vue-virtual-scroller needs this polyfill: https://github.com/Akryum/vue-virtual-scroller#installation +import "intersection-observer"; + import Vue from "vue"; +import VueVirtualScroller from "vue-virtual-scroller"; +import "vue-virtual-scroller/dist/vue-virtual-scroller.css"; + import App from "@/App.vue"; import router from "@/router"; import "@/config"; import store from "./store/store"; +Vue.use(VueVirtualScroller); + new Vue({ router, store, From 8f3f9e5c02ad72b2842ea33c9be4fd6b59c345d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vyzaldy=20Andr=C3=A9s=20Sanchez?= Date: Tue, 5 May 2020 10:30:10 -0400 Subject: [PATCH 2/2] virtual-scroller - Abstracts config into a separate file --- src/config/index.js | 2 ++ src/config/virtual-scroller.js | 8 ++++++++ src/main.js | 7 ------- 3 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 src/config/virtual-scroller.js diff --git a/src/config/index.js b/src/config/index.js index 855a018..2ea3129 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -1,4 +1,6 @@ import Vue from "vue"; + import "@/config/materialize"; +import "@/config/virtual-scroller"; Vue.config.productionTip = false; diff --git a/src/config/virtual-scroller.js b/src/config/virtual-scroller.js new file mode 100644 index 0000000..baf3050 --- /dev/null +++ b/src/config/virtual-scroller.js @@ -0,0 +1,8 @@ +// vue-virtual-scroller needs this polyfill: https://github.com/Akryum/vue-virtual-scroller#installation +import "intersection-observer"; + +import Vue from "vue"; +import VueVirtualScroller from "vue-virtual-scroller"; +import "vue-virtual-scroller/dist/vue-virtual-scroller.css"; + +Vue.use(VueVirtualScroller); diff --git a/src/main.js b/src/main.js index e3dc7ab..5d53d98 100644 --- a/src/main.js +++ b/src/main.js @@ -1,17 +1,10 @@ -// vue-virtual-scroller needs this polyfill: https://github.com/Akryum/vue-virtual-scroller#installation -import "intersection-observer"; - import Vue from "vue"; -import VueVirtualScroller from "vue-virtual-scroller"; -import "vue-virtual-scroller/dist/vue-virtual-scroller.css"; import App from "@/App.vue"; import router from "@/router"; import "@/config"; import store from "./store/store"; -Vue.use(VueVirtualScroller); - new Vue({ router, store,