G
G
ganbaat2018-12-30 20:19:06
Vue.js
ganbaat, 2018-12-30 20:19:06

How to export vue method from template to css file?

how to export vue method from template to css file. Let's say I want to assign a div {backround: url('getPhoto()') }; how to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Koch, 2018-12-30
@ganbaat

<div v-bind:style="{backround: `url('${getPhoto()}')`}"></div>

Working with classes and styles

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question