Browse Source

fixed modalcard lazy load

bach 2 years ago
parent
commit
fda78eea9d

File diff suppressed because it is too large
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/main.js


BIN
web/themes/custom/materiotheme/assets/dist/main.js.gz


File diff suppressed because it is too large
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/module-article.bundle.js


BIN
web/themes/custom/materiotheme/assets/dist/module-article.bundle.js.gz


File diff suppressed because it is too large
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/module-base.bundle.js


BIN
web/themes/custom/materiotheme/assets/dist/module-base.bundle.js.gz


File diff suppressed because it is too large
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/module-thematique.bundle.js


BIN
web/themes/custom/materiotheme/assets/dist/module-thematique.bundle.js.gz


File diff suppressed because it is too large
+ 1 - 1
web/themes/custom/materiotheme/assets/dist/report.html


File diff suppressed because it is too large
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/web_themes_custom_materiotheme_vuejs_components_Content_Card_vue.bundle.js


BIN
web/themes/custom/materiotheme/assets/dist/web_themes_custom_materiotheme_vuejs_components_Content_Card_vue.bundle.js.gz


+ 3 - 0
web/themes/custom/materiotheme/vuejs/components/Content/Card.vue

@@ -131,6 +131,9 @@ export default {
       }
     }
   },
+  beforeMount () {
+    console.log(this.item.id, this.samples)
+  },
   methods: {
     ...mapActions({
       // refreshItem: 'Search/refreshItem',

+ 3 - 3
web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue

@@ -421,9 +421,9 @@ export default {
           }
           // delay the lazyload to let the card the time to update dom
           // maybe not the best method
-          setTimeout(function () {
-            this.activateLazyLoad()
-          }.bind(this), 5)
+          // setTimeout(function () {
+          //   this.activateLazyLoad()
+          // }.bind(this), 5)
         })
         .catch(error => {
           console.warn('Issue with loadMaterial', error)

+ 3 - 3
web/themes/custom/materiotheme/vuejs/components/cardMixins.js

@@ -3,7 +3,7 @@ export default {
   directives: {
     lazy: {
       bind (figure, binding) {
-        // console.log('lazy bind', figure, binding)
+        console.log('directive lazy bind', figure, binding)
         // show only the first image
         if (binding.value === 0) {
           const img = figure.querySelector('img:not(.blank)')
@@ -52,7 +52,7 @@ export default {
       }
     }
   },
-  mounted () {
+  updated () {
     // lazy load images on mouseover
     console.log('card mounted', this.$options.name)
     // if (this.$options.name ==! 'ModalCard') {
@@ -89,7 +89,7 @@ export default {
   }
   // ,
   // methods: {
-  //   // not used
+  //   // used by ModalCard
   //   activateLazyLoad () {
   //     console.log('card activateLazyLoad', this.$options.name)
 

Some files were not shown because too many files changed in this diff