vuejs pass variable to css

Solutions on MaxInterview for vuejs pass variable to css by the best coders in the world

showing results for - "vuejs pass variable to css"
Fay
26 Mar 2020
1<template>
2<div>
3  <div class="text">hello</div>
4</div>
5</template>
6
7<script>
8export default {
9    data() {
10        return {
11            color: 'red',
12        }
13    }
14}
15</script>
16
17<style>
18.text {
19    color: v-bind(color);
20}
21</style>