|
@@ -9,7 +9,7 @@ export default {
|
|
const img = figure.querySelector('img:not(.blank)')
|
|
const img = figure.querySelector('img:not(.blank)')
|
|
figure.classList.add('loading')
|
|
figure.classList.add('loading')
|
|
img.addEventListener('load', function (e) {
|
|
img.addEventListener('load', function (e) {
|
|
- console.log('img loaded', e)
|
|
|
|
|
|
+ // console.log('img loaded', e)
|
|
figure.classList.remove('loading')
|
|
figure.classList.remove('loading')
|
|
figure.classList.add('loaded')
|
|
figure.classList.add('loaded')
|
|
})
|
|
})
|
|
@@ -57,14 +57,14 @@ export default {
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
// lazy load images on mouseover
|
|
// lazy load images on mouseover
|
|
- console.log('card mounted', this.$options.name)
|
|
|
|
|
|
+ // console.log('card mounted', this.$options.name)
|
|
// if (this.$options.name ==! 'ModalCard') {
|
|
// if (this.$options.name ==! 'ModalCard') {
|
|
this.activateLazyLoad()
|
|
this.activateLazyLoad()
|
|
// }
|
|
// }
|
|
},
|
|
},
|
|
updated () {
|
|
updated () {
|
|
// lazy load images on mouseover
|
|
// lazy load images on mouseover
|
|
- console.log('card updated', this.$options.name)
|
|
|
|
|
|
+ // console.log('card updated', this.$options.name)
|
|
// if (this.$options.name ==! 'ModalCard') {
|
|
// if (this.$options.name ==! 'ModalCard') {
|
|
this.activateLazyLoad()
|
|
this.activateLazyLoad()
|
|
// }
|
|
// }
|
|
@@ -72,7 +72,7 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
// used by ModalCard
|
|
// used by ModalCard
|
|
activateLazyLoad () {
|
|
activateLazyLoad () {
|
|
- console.log('card activateLazyLoad', this.$options.name)
|
|
|
|
|
|
+ // console.log('card activateLazyLoad', this.$options.name)
|
|
|
|
|
|
this.$el.addEventListener('mouseover', function (event) {
|
|
this.$el.addEventListener('mouseover', function (event) {
|
|
const figures = this.querySelectorAll('.images figure.lazy:not(.loaded):not(.loading)')
|
|
const figures = this.querySelectorAll('.images figure.lazy:not(.loaded):not(.loading)')
|