Answer the question
In order to leave comments, you need to log in
How to pass image url through props and display in :style?
Good day. Via props comes the name of the image (icon.png). How to display it in v-bind:style={background:url(here)};
The image is in assets
Answer the question
In order to leave comments, you need to log in
Good afternoon. After all, to draw an image, you need to specify the url path, respectively, in v-bind:, you need to specify the path relative to the element in which you want to draw the image. For example, using backticks: `../assets/${propsName}`.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question