Answer the question
In order to leave comments, you need to log in
How not to load image via require in mobile version?
The template has an image that is loaded via require, but if you put display: none on the element in the mobile version, it still loads. How not to load an element in the mobile version. v-if tried does not help.
<img
alt="laptop"
v-for="item in 52"
v-show="item === imgNumber"
:src="require(`@/assets/images/main/laptop/${ item }.jpg`)"
/>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question