Answer the question
In order to leave comments, you need to log in
Why does the computed property give an error when outputting to a template?
Is computed
sliderHeight() {
return this.$refs.slide[this.sliderActive - 1].clientHeight
}
:style="{
left: sliderOffsetLeft,
height: sliderHeight + 'px'
}"
Answer the question
In order to leave comments, you need to log in
Someone inattentively read the documentation :
An important note about link registration time: since links are created by the render function, you won't be able to use them on initial render - they don't exist yet! Also, the $refs object is not reactive, so don't try to use it in data binding templates.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question