Updates vue-awesome-swiper to last version and fix breaking changes on carousels and slideshow. #406.
This commit is contained in:
parent
a6f2f57408
commit
5636772165
|
@ -3435,11 +3435,11 @@
|
|||
}
|
||||
},
|
||||
"dom7": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/dom7/-/dom7-2.1.2.tgz",
|
||||
"integrity": "sha512-cGwWtpu7KY3JnbREGqG4EGC/u+1hyLfWVMqrqRjmwiO8d5i4B+0imLZAQ/cJbiXnjbs0pdIUzcUyeI9BbnyKNg==",
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmjs.org/dom7/-/dom7-2.1.5.tgz",
|
||||
"integrity": "sha512-xnhwVgyOh3eD++/XGtH+5qBwYTgCm0aW91GFgPJ3XG+jlsRLyJivnbP0QmUBFhI+Oaz9FV0s7cxgXHezwOEBYA==",
|
||||
"requires": {
|
||||
"ssr-window": "^1.0.1"
|
||||
"ssr-window": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"domain-browser": {
|
||||
|
@ -3673,9 +3673,9 @@
|
|||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.15",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
||||
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
|
||||
"version": "4.17.19",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
|
||||
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==",
|
||||
"dev": true
|
||||
},
|
||||
"ms": {
|
||||
|
@ -4433,13 +4433,10 @@
|
|||
}
|
||||
},
|
||||
"follow-redirects": {
|
||||
"version": "1.11.0",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.11.0.tgz",
|
||||
"integrity": "sha512-KZm0V+ll8PfBrKwMzdo5D13b1bur9Iq9Zd/RMmAoQQcl2PxxFml8cxXPaaPYVbV0RjNjq1CU7zIzAOqtUPudmA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^3.0.0"
|
||||
}
|
||||
"version": "1.12.1",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.12.1.tgz",
|
||||
"integrity": "sha512-tmRv0AVuR7ZyouUHLeNSiO6pqulF7dYa3s19c6t+wz9LD69/uSzdMxJ2S91nTI9U3rt/IldxpzMOFejp6f0hjg==",
|
||||
"dev": true
|
||||
},
|
||||
"for-in": {
|
||||
"version": "1.0.2",
|
||||
|
@ -5471,9 +5468,9 @@
|
|||
}
|
||||
},
|
||||
"http-proxy": {
|
||||
"version": "1.18.0",
|
||||
"resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.0.tgz",
|
||||
"integrity": "sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ==",
|
||||
"version": "1.18.1",
|
||||
"resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
|
||||
"integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"eventemitter3": "^4.0.0",
|
||||
|
@ -5810,9 +5807,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.15",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
||||
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
|
||||
"version": "4.17.19",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
|
||||
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==",
|
||||
"dev": true
|
||||
},
|
||||
"string-width": {
|
||||
|
@ -6418,9 +6415,9 @@
|
|||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.15",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
||||
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
|
||||
"version": "4.17.19",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
|
||||
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
|
||||
},
|
||||
"loglevel": {
|
||||
"version": "1.6.8",
|
||||
|
@ -9452,9 +9449,9 @@
|
|||
}
|
||||
},
|
||||
"ssr-window": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-1.0.1.tgz",
|
||||
"integrity": "sha512-dgFqB+f00LJTEgb6UXhx0h+SrG50LJvti2yMKMqAgzfUmUXZrLSv2fjULF7AWGwK25EXu8+smLR3jYsJQChPsg=="
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-2.0.0.tgz",
|
||||
"integrity": "sha512-NXzN+/HPObKAx191H3zKlYomE5WrVIkoCB5IaSdvKokxTpjBdWfr0RaP+1Z5KOfDT0ZVz+2tdtiBkhsEQ9p+0A=="
|
||||
},
|
||||
"ssri": {
|
||||
"version": "6.0.1",
|
||||
|
@ -9971,12 +9968,12 @@
|
|||
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
|
||||
},
|
||||
"swiper": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/swiper/-/swiper-4.4.1.tgz",
|
||||
"integrity": "sha512-SONgpB1mFh++eFiUDOCggwW2ZzsWMEf3+SEROcQ+qXPYUnyD423l3uDsk+0jdo/a4pXeOJmH0oN3XK5maMqQyQ==",
|
||||
"version": "5.4.5",
|
||||
"resolved": "https://registry.npmjs.org/swiper/-/swiper-5.4.5.tgz",
|
||||
"integrity": "sha512-7QjA0XpdOmiMoClfaZ2lYN6ICHcMm72LXiY+NF4fQLFidigameaofvpjEEiTQuw3xm5eksG5hzkaRsjQX57vtA==",
|
||||
"requires": {
|
||||
"dom7": "^2.1.2",
|
||||
"ssr-window": "^1.0.1"
|
||||
"dom7": "^2.1.5",
|
||||
"ssr-window": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"t": {
|
||||
|
@ -10009,9 +10006,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.15",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
||||
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
|
||||
"version": "4.17.19",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
|
||||
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==",
|
||||
"dev": true
|
||||
},
|
||||
"string-width": {
|
||||
|
@ -10703,13 +10700,9 @@
|
|||
"integrity": "sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ=="
|
||||
},
|
||||
"vue-awesome-swiper": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/vue-awesome-swiper/-/vue-awesome-swiper-3.1.3.tgz",
|
||||
"integrity": "sha512-E7suzkyApO8vNZbgdEnjSmnpsmQZyRvSVXJ7sey3XYwKPOkLhH3+GnHroBw+5PZIQXvWBwdCeQsPG1xQ1r1Rhg==",
|
||||
"requires": {
|
||||
"object-assign": "^4.1.1",
|
||||
"swiper": "^4.0.7"
|
||||
}
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/vue-awesome-swiper/-/vue-awesome-swiper-4.1.1.tgz",
|
||||
"integrity": "sha512-50um10t6N+lJaORkpwSi1wWuMmBI1sgFc9Znsi5oUykw2cO5DzLaBHcO2JNX21R+Ue4TGoIJDhhxjBHtkFrTEQ=="
|
||||
},
|
||||
"vue-eslint-parser": {
|
||||
"version": "5.0.0",
|
||||
|
|
|
@ -17,10 +17,11 @@
|
|||
"qs": "^6.9.4",
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1",
|
||||
"swiper": "^5.2.0",
|
||||
"t": "^0.5.1",
|
||||
"v-tooltip": "^2.0.3",
|
||||
"vue": "^2.6.11",
|
||||
"vue-awesome-swiper": "^3.1.3",
|
||||
"vue-awesome-swiper": "^4.1.1",
|
||||
"vue-masonry-css": "^1.0.3",
|
||||
"vue-router": "^3.1.6",
|
||||
"vue-the-mask": "^0.11.1",
|
||||
|
|
|
@ -66,7 +66,9 @@
|
|||
background: var(--tainacan-block-gray1, #f2f2f2); }
|
||||
|
||||
.wp-block-tainacan-carousel-collections-list {
|
||||
margin: 2em auto; }
|
||||
margin: 2em auto;
|
||||
--swiper-navigation-color: var(--tainacan-block-primary, $primary);
|
||||
--swiper-theme-color: var(--tainacan-block-primary, $primary); }
|
||||
.wp-block-tainacan-carousel-collections-list .spinner-container {
|
||||
min-height: 56px;
|
||||
padding: 1em;
|
||||
|
@ -173,6 +175,10 @@
|
|||
margin: 0 -4px; }
|
||||
.wp-block-tainacan-carousel-collections-list .swiper-button-prev svg, .wp-block-tainacan-carousel-collections-list .swiper-button-next svg {
|
||||
fill: var(--tainacan-block-primary, #298596); }
|
||||
.wp-block-tainacan-carousel-collections-list .swiper-button-prev:after, .wp-block-tainacan-carousel-collections-list .swiper-button-prev::before, .wp-block-tainacan-carousel-collections-list .swiper-button-next:after, .wp-block-tainacan-carousel-collections-list .swiper-button-next::before {
|
||||
font-family: "TainacanIcons"; }
|
||||
.wp-block-tainacan-carousel-collections-list .swiper-button-prev.swiper-button-prev::after, .wp-block-tainacan-carousel-collections-list .swiper-button-next.swiper-button-prev::after {
|
||||
content: "previous"; }
|
||||
.wp-block-tainacan-carousel-collections-list.alignfull .swiper-button-prev, .wp-block-tainacan-carousel-collections-list .swiper-button-next {
|
||||
margin: 0 6px; }
|
||||
.wp-block-tainacan-carousel-collections-list .collections-list-edit-container,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,7 @@
|
|||
.wp-block-tainacan-carousel-items-list {
|
||||
margin: 2em auto; }
|
||||
margin: 2em auto;
|
||||
--swiper-navigation-color: var(--tainacan-block-primary, $primary);
|
||||
--swiper-theme-color: var(--tainacan-block-primary, $primary); }
|
||||
.wp-block-tainacan-carousel-items-list .spinner-container {
|
||||
min-height: 56px;
|
||||
padding: 1em;
|
||||
|
@ -154,6 +156,10 @@
|
|||
margin: 0 -4px; }
|
||||
.wp-block-tainacan-carousel-items-list .swiper-button-prev svg, .wp-block-tainacan-carousel-items-list .swiper-button-next svg {
|
||||
fill: var(--tainacan-block-primary, #298596); }
|
||||
.wp-block-tainacan-carousel-items-list .swiper-button-prev:after, .wp-block-tainacan-carousel-items-list .swiper-button-prev::before, .wp-block-tainacan-carousel-items-list .swiper-button-next:after, .wp-block-tainacan-carousel-items-list .swiper-button-next::before {
|
||||
font-family: "TainacanIcons"; }
|
||||
.wp-block-tainacan-carousel-items-list .swiper-button-prev.swiper-button-prev::after, .wp-block-tainacan-carousel-items-list .swiper-button-next.swiper-button-prev::after {
|
||||
content: "previous"; }
|
||||
.wp-block-tainacan-carousel-items-list .items-list-edit-container,
|
||||
.wp-block-tainacan-carousel-items-list .tainacan-carousel {
|
||||
position: relative; }
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -66,7 +66,9 @@
|
|||
background: var(--tainacan-block-gray1, #f2f2f2); }
|
||||
|
||||
.wp-block-tainacan-carousel-terms-list {
|
||||
margin: 2em auto; }
|
||||
margin: 2em auto;
|
||||
--swiper-navigation-color: var(--tainacan-block-primary, $primary);
|
||||
--swiper-theme-color: var(--tainacan-block-primary, $primary); }
|
||||
.wp-block-tainacan-carousel-terms-list .spinner-container {
|
||||
min-height: 56px;
|
||||
padding: 1em;
|
||||
|
@ -172,6 +174,10 @@
|
|||
margin: 0 -4px; }
|
||||
.wp-block-tainacan-carousel-terms-list .swiper-button-prev svg, .wp-block-tainacan-carousel-terms-list .swiper-button-next svg {
|
||||
fill: var(--tainacan-block-primary, #298596); }
|
||||
.wp-block-tainacan-carousel-terms-list .swiper-button-prev:after, .wp-block-tainacan-carousel-terms-list .swiper-button-prev::before, .wp-block-tainacan-carousel-terms-list .swiper-button-next:after, .wp-block-tainacan-carousel-terms-list .swiper-button-next::before {
|
||||
font-family: "TainacanIcons"; }
|
||||
.wp-block-tainacan-carousel-terms-list .swiper-button-prev.swiper-button-prev::after, .wp-block-tainacan-carousel-terms-list .swiper-button-next.swiper-button-prev::after {
|
||||
content: "previous"; }
|
||||
.wp-block-tainacan-carousel-terms-list.alignfull .swiper-button-prev, .wp-block-tainacan-carousel-terms-list .swiper-button-next {
|
||||
margin: 0 6px; }
|
||||
.wp-block-tainacan-carousel-terms-list .terms-list-edit-container,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -191,14 +191,14 @@
|
|||
<script>
|
||||
import axios from 'axios';
|
||||
import qs from 'qs';
|
||||
import 'swiper/dist/css/swiper.css';
|
||||
import { swiper, swiperSlide } from 'vue-awesome-swiper';
|
||||
import 'swiper/css/swiper.min.css';
|
||||
import { Swiper, SwiperSlide } from 'vue-awesome-swiper';
|
||||
|
||||
export default {
|
||||
name: "CarouselCollectionsListTheme",
|
||||
components: {
|
||||
swiper,
|
||||
swiperSlide
|
||||
Swiper,
|
||||
SwiperSlide
|
||||
},
|
||||
props: {
|
||||
blockId: String,
|
||||
|
|
|
@ -84,6 +84,8 @@
|
|||
|
||||
.wp-block-tainacan-carousel-collections-list {
|
||||
margin: 2em auto;
|
||||
--swiper-navigation-color: var(--tainacan-block-primary, $primary);
|
||||
--swiper-theme-color: var(--tainacan-block-primary, $primary);
|
||||
|
||||
// Spinner
|
||||
.spinner-container {
|
||||
|
@ -206,6 +208,13 @@
|
|||
svg {
|
||||
fill: var(--tainacan-block-primary, $primary);
|
||||
}
|
||||
&:after,
|
||||
&::before {
|
||||
font-family: "TainacanIcons";
|
||||
}
|
||||
&.swiper-button-prev::after {
|
||||
content: "previous";
|
||||
}
|
||||
}
|
||||
|
||||
&.alignfull .swiper-button-prev, .swiper-button-next {
|
||||
|
|
|
@ -196,14 +196,14 @@
|
|||
<script>
|
||||
import axios from 'axios';
|
||||
import qs from 'qs';
|
||||
import 'swiper/dist/css/swiper.css';
|
||||
import { swiper, swiperSlide } from 'vue-awesome-swiper';
|
||||
import 'swiper/css/swiper.min.css';
|
||||
import { Swiper, SwiperSlide } from 'vue-awesome-swiper';
|
||||
|
||||
export default {
|
||||
name: "CarouselItemsListTheme",
|
||||
components: {
|
||||
swiper,
|
||||
swiperSlide
|
||||
Swiper,
|
||||
SwiperSlide
|
||||
},
|
||||
props: {
|
||||
blockId: String,
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
.wp-block-tainacan-carousel-items-list {
|
||||
margin: 2em auto;
|
||||
--swiper-navigation-color: var(--tainacan-block-primary, $primary);
|
||||
--swiper-theme-color: var(--tainacan-block-primary, $primary);
|
||||
|
||||
// Spinner
|
||||
.spinner-container {
|
||||
|
@ -190,6 +192,13 @@
|
|||
svg {
|
||||
fill: var(--tainacan-block-primary, $primary);
|
||||
}
|
||||
&:after,
|
||||
&::before {
|
||||
font-family: "TainacanIcons";
|
||||
}
|
||||
&.swiper-button-prev::after {
|
||||
content: "previous";
|
||||
}
|
||||
}
|
||||
|
||||
// Carousel placeholder on editor side ----------------------------------------------------
|
||||
|
|
|
@ -166,14 +166,14 @@
|
|||
<script>
|
||||
import axios from 'axios';
|
||||
import qs from 'qs';
|
||||
import 'swiper/dist/css/swiper.css';
|
||||
import { swiper, swiperSlide } from 'vue-awesome-swiper';
|
||||
import 'swiper/css/swiper.min.css';
|
||||
import { Swiper, SwiperSlide } from 'vue-awesome-swiper';
|
||||
|
||||
export default {
|
||||
name: "CarouselTermsListTheme",
|
||||
components: {
|
||||
swiper,
|
||||
swiperSlide
|
||||
Swiper,
|
||||
SwiperSlide
|
||||
},
|
||||
props: {
|
||||
blockId: String,
|
||||
|
|
|
@ -84,6 +84,8 @@
|
|||
|
||||
.wp-block-tainacan-carousel-terms-list {
|
||||
margin: 2em auto;
|
||||
--swiper-navigation-color: var(--tainacan-block-primary, $primary);
|
||||
--swiper-theme-color: var(--tainacan-block-primary, $primary);
|
||||
|
||||
// Spinner
|
||||
.spinner-container {
|
||||
|
@ -205,6 +207,13 @@
|
|||
svg {
|
||||
fill: var(--tainacan-block-primary, $primary);
|
||||
}
|
||||
&:after,
|
||||
&::before {
|
||||
font-family: "TainacanIcons";
|
||||
}
|
||||
&.swiper-button-prev::after {
|
||||
content: "previous";
|
||||
}
|
||||
}
|
||||
&.alignfull .swiper-button-prev, .swiper-button-next {
|
||||
margin: 0 6px;
|
||||
|
|
|
@ -305,16 +305,16 @@
|
|||
<script>
|
||||
import { mapActions, mapGetters } from 'vuex';
|
||||
import axios from '../../admin/js/axios';
|
||||
import 'swiper/dist/css/swiper.css';
|
||||
import { swiper, swiperSlide } from 'vue-awesome-swiper';
|
||||
import 'swiper/css/swiper.min.css';
|
||||
import { Swiper, SwiperSlide } from 'vue-awesome-swiper';
|
||||
import CircularCounter from './circular-counter.vue';
|
||||
import { viewModesMixin } from '../js/view-modes-mixin.js';
|
||||
|
||||
export default {
|
||||
name: 'ViewModeSlideshow',
|
||||
components: {
|
||||
swiper,
|
||||
swiperSlide,
|
||||
Swiper,
|
||||
SwiperSlide,
|
||||
CircularCounter
|
||||
},
|
||||
mixins: [
|
||||
|
@ -422,14 +422,14 @@ export default {
|
|||
if (this.goingRight == undefined && updatedSlideIndex == 0) {
|
||||
this.slideIndex = -1; // Used to force reload of index when page has not loaded slideItems yet
|
||||
} else {
|
||||
if (this.$refs.mySwiper != undefined && this.$refs.mySwiper.swiper != undefined) {
|
||||
// if (updatedSlideIndex != undefined && this.$refs.mySwiper.swiper.slides[updatedSlideIndex] != undefined)
|
||||
// this.$refs.mySwiper.swiper.slides[updatedSlideIndex].click();
|
||||
if (this.$refs.mySwiper != undefined && this.$refs.mySwiper.$swiper != undefined) {
|
||||
// if (updatedSlideIndex != undefined && this.$refs.mySwiper.$swiper.slides[updatedSlideIndex] != undefined)
|
||||
// this.$refs.mySwiper.$swiper.slides[updatedSlideIndex].click();
|
||||
|
||||
this.$refs.mySwiper.swiper.activeIndex = this.slideIndex;
|
||||
this.$refs.mySwiper.$swiper.activeIndex = this.slideIndex;
|
||||
this.slideIndex = updatedSlideIndex;
|
||||
|
||||
// console.log("Após: " + this.slideIndex + " " + this.$refs.mySwiper.swiper.activeIndex);
|
||||
// console.log("Após: " + this.slideIndex + " " + this.$refs.mySwiper.$swiper.activeIndex);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -455,25 +455,25 @@ export default {
|
|||
this.loadCurrentItem();
|
||||
|
||||
// Handles requesting new page of items, either to left or right
|
||||
if (this.$refs.mySwiper != undefined && this.$refs.mySwiper.swiper != undefined) {
|
||||
if (this.$refs.mySwiper != undefined && this.$refs.mySwiper.$swiper != undefined) {
|
||||
|
||||
if (this.slideIndex != this.$refs.mySwiper.swiper.activeIndex) {
|
||||
if (this.slideIndex != undefined && this.$refs.mySwiper.swiper.slides[this.slideIndex] != undefined)
|
||||
this.$refs.mySwiper.swiper.slides[this.slideIndex].click();
|
||||
if (this.slideIndex != this.$refs.mySwiper.$swiper.activeIndex) {
|
||||
if (this.slideIndex != undefined && this.$refs.mySwiper.$swiper.slides[this.slideIndex] != undefined)
|
||||
this.$refs.mySwiper.$swiper.slides[this.slideIndex].click();
|
||||
|
||||
this.readjustedSlideIndex = this.slideIndex;
|
||||
this.$refs.mySwiper.swiper.activeIndex = this.slideIndex + 0;
|
||||
this.$refs.mySwiper.$swiper.activeIndex = this.slideIndex + 0;
|
||||
|
||||
} else if (this.slideItems.length > 0) {
|
||||
if (this.$refs.mySwiper.swiper.activeIndex == this.slideItems.length - 1 && this.page < this.totalPages) {
|
||||
if (this.$refs.mySwiper.$swiper.activeIndex == this.slideItems.length - 1 && this.page < this.totalPages) {
|
||||
oldVal == undefined ? this.$eventBusSearch.setPage(this.page + 1) : this.$eventBusSearch.setPage(this.maxPage + 1);
|
||||
} else if (this.$refs.mySwiper.swiper.activeIndex == 0 && this.page > 1 && this.slideItems.length < this.totalItems) {
|
||||
} else if (this.$refs.mySwiper.$swiper.activeIndex == 0 && this.page > 1 && this.slideItems.length < this.totalItems) {
|
||||
oldVal == undefined ? this.$eventBusSearch.setPage(this.page - 1) : this.$eventBusSearch.setPage(this.minPage - 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Handles pausing auto play when reaches the end of the list.
|
||||
if (this.$refs.mySwiper.swiper.activeIndex == this.slideItems.length - 1 && this.page == this.totalPages)
|
||||
if (this.$refs.mySwiper.$swiper.activeIndex == this.slideItems.length - 1 && this.page == this.totalPages)
|
||||
this.isPlaying = false;
|
||||
}
|
||||
}
|
||||
|
@ -483,8 +483,8 @@ export default {
|
|||
isPlaying() {
|
||||
if (this.isPlaying) {
|
||||
this.intervalId = setInterval(() => {
|
||||
if (this.$refs.mySwiper.swiper != undefined)
|
||||
this.$refs.mySwiper.swiper.navigation.nextEl.click();
|
||||
if (this.$refs.mySwiper.$swiper != undefined)
|
||||
this.$refs.mySwiper.$swiper.navigation.nextEl.click();
|
||||
}, this.slideTimeout);
|
||||
} else {
|
||||
clearInterval(this.intervalId);
|
||||
|
@ -494,9 +494,8 @@ export default {
|
|||
mounted() {
|
||||
this.minPage = this.page;
|
||||
this.maxPage = this.page;
|
||||
|
||||
if (this.$refs.mySwiper.swiper != undefined) {
|
||||
this.$refs.mySwiper.swiper.initialSlide = this.slideIndex;
|
||||
if (this.$refs.mySwiper.$swiper != undefined) {
|
||||
this.$refs.mySwiper.$swiper.initialSlide = this.slideIndex;
|
||||
}
|
||||
|
||||
// Adds clipped class to root html
|
||||
|
@ -505,8 +504,8 @@ export default {
|
|||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.intervalId);
|
||||
if (this.$refs.mySwiper.swiper)
|
||||
this.$refs.mySwiper.swiper.destroy();
|
||||
if (this.$refs.mySwiper.$swiper)
|
||||
this.$refs.mySwiper.$swiper.destroy();
|
||||
|
||||
// Remove clipped class from root html
|
||||
document.documentElement.classList.remove('is-clipped');
|
||||
|
@ -533,14 +532,14 @@ export default {
|
|||
},
|
||||
onSlideChange() {
|
||||
|
||||
if (this.$refs.mySwiper.swiper != undefined)
|
||||
this.slideIndex = this.$refs.mySwiper.swiper.activeIndex;
|
||||
if (this.$refs.mySwiper.$swiper != undefined)
|
||||
this.slideIndex = this.$refs.mySwiper.$swiper.activeIndex;
|
||||
|
||||
this.$nextTick(() => {
|
||||
if (this.readjustedSlideIndex != undefined) {
|
||||
|
||||
if (this.slideIndex != undefined && this.$refs.mySwiper.swiper.slides[this.readjustedSlideIndex] != undefined)
|
||||
this.$refs.mySwiper.swiper.slides[this.readjustedSlideIndex].click();
|
||||
if (this.slideIndex != undefined && this.$refs.mySwiper.$swiper.slides[this.readjustedSlideIndex] != undefined)
|
||||
this.$refs.mySwiper.$swiper.slides[this.readjustedSlideIndex].click();
|
||||
|
||||
this.readjustedSlideIndex = undefined;
|
||||
}
|
||||
|
@ -548,12 +547,12 @@ export default {
|
|||
|
||||
},
|
||||
nextSlide() {
|
||||
if (this.$refs.mySwiper.swiper != undefined)
|
||||
this.$refs.mySwiper.swiper.slideNext();
|
||||
if (this.$refs.mySwiper.$swiper != undefined)
|
||||
this.$refs.mySwiper.$swiper.slideNext();
|
||||
},
|
||||
prevSlide() {
|
||||
if (this.$refs.mySwiper.swiper != undefined)
|
||||
this.$refs.mySwiper.swiper.slidePrev();
|
||||
if (this.$refs.mySwiper.$swiper != undefined)
|
||||
this.$refs.mySwiper.$swiper.slidePrev();
|
||||
},
|
||||
nextGroupOfSlides() {
|
||||
let screenWidth = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth);
|
||||
|
@ -566,11 +565,11 @@ export default {
|
|||
else if (screenWidth > 1366 && screenWidth <= 1600) amountToSkip = 6;
|
||||
else if (screenWidth > 1600) amountToSkip = 7;
|
||||
|
||||
if (this.$refs.mySwiper.swiper != undefined) {
|
||||
if (this.slideIndex != undefined && this.$refs.mySwiper.swiper.slides[this.slideIndex + amountToSkip] != undefined)
|
||||
this.$refs.mySwiper.swiper.slideTo(this.slideIndex + amountToSkip);
|
||||
if (this.$refs.mySwiper.$swiper != undefined) {
|
||||
if (this.slideIndex != undefined && this.$refs.mySwiper.$swiper.slides[this.slideIndex + amountToSkip] != undefined)
|
||||
this.$refs.mySwiper.$swiper.slideTo(this.slideIndex + amountToSkip);
|
||||
else
|
||||
this.$refs.mySwiper.swiper.slideTo(this.$refs.mySwiper.swiper.slides.length - 1)
|
||||
this.$refs.mySwiper.$swiper.slideTo(this.$refs.mySwiper.$swiper.slides.length - 1)
|
||||
}
|
||||
},
|
||||
prevGroupOfSlides() {
|
||||
|
@ -584,11 +583,11 @@ export default {
|
|||
else if (screenWidth > 1366 && screenWidth <= 1600) amountToSkip = 6;
|
||||
else if (screenWidth > 1600) amountToSkip = 7;
|
||||
|
||||
if (this.$refs.mySwiper.swiper != undefined) {
|
||||
if (this.slideIndex != undefined && this.$refs.mySwiper.swiper.slides[this.slideIndex - amountToSkip] != undefined)
|
||||
this.$refs.mySwiper.swiper.slideTo(this.slideIndex - amountToSkip);
|
||||
if (this.$refs.mySwiper.$swiper != undefined) {
|
||||
if (this.slideIndex != undefined && this.$refs.mySwiper.$swiper.slides[this.slideIndex - amountToSkip] != undefined)
|
||||
this.$refs.mySwiper.$swiper.slideTo(this.slideIndex - amountToSkip);
|
||||
else
|
||||
this.$refs.mySwiper.swiper.slideTo(0);
|
||||
this.$refs.mySwiper.$swiper.slideTo(0);
|
||||
}
|
||||
},
|
||||
loadCurrentItem() {
|
||||
|
|
|
@ -231,6 +231,7 @@
|
|||
}
|
||||
&>div img {
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.empty-document {
|
||||
|
|
|
@ -137,7 +137,7 @@ if (production === true) {
|
|||
module.exports.resolve = {
|
||||
alias: {
|
||||
'vue$': 'vue/dist/vue.min',
|
||||
'swiper$': 'swiper/dist/js/swiper.min.js'
|
||||
'Swiper$': 'swiper/js/swiper.min.js'
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -162,7 +162,7 @@ if (production === true) {
|
|||
alias: {
|
||||
//'vue$': 'vue/dist/vue.esm' // uncomment this and comment the above to use vue dev tools (can cause type error)
|
||||
'vue$': 'vue/dist/vue.min',
|
||||
'swiper$': 'swiper/dist/js/swiper.min.js'
|
||||
'Swiper$': 'swiper/js/swiper.min.js'
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue