home async loading bug fix
This commit is contained in:
parent
84ae91655e
commit
c4a803cbd9
File diff suppressed because one or more lines are too long
|
@ -21,10 +21,7 @@ export default {
|
|||
// compile the html src (coming from parent with props or from ajax call)
|
||||
if(this.html){
|
||||
// console.log('html', this.html);
|
||||
this.template = Vue.compile(this.html)
|
||||
this.$options.staticRenderFns = []
|
||||
this._staticTrees = []
|
||||
this.template.staticRenderFns.map(fn => (this.$options.staticRenderFns.push(fn)))
|
||||
this.compileTemplate()
|
||||
}
|
||||
},
|
||||
render(h) {
|
||||
|
@ -35,9 +32,16 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted(){
|
||||
this.initShowroomCarroussel()
|
||||
// this.initShowroomCarroussel()
|
||||
},
|
||||
methods: {
|
||||
compileTemplate(){
|
||||
this.template = Vue.compile(this.html)
|
||||
this.$options.staticRenderFns = []
|
||||
this._staticTrees = []
|
||||
this.template.staticRenderFns.map(fn => (this.$options.staticRenderFns.push(fn)))
|
||||
setTimeout(this.initShowroomCarroussel.bind(this), 250)
|
||||
},
|
||||
initShowroomCarroussel(){
|
||||
console.log("startShowroomCarroussel");
|
||||
this.showrooms = document.querySelectorAll('.field--name-computed-showrooms-reference > .field__item')
|
||||
|
@ -131,6 +135,12 @@ export default {
|
|||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
html: function(val) {
|
||||
console.log('html prop changed', val)
|
||||
this.compileTemplate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue