0👍
I do not think there is anything exactly like what you want, But maybe this will help you:
<template>
<div :style="myVars">{{ SOMETHING }}</div>
</template>
<script>
export default {
data() {
return { SOMETHING: 'red'}
},
computed: {
myVars () {
return{
'--text-color': this.SOMETHING,
}
}
}
<script>
<style scoped>
div{
color: var(--text-color);
}
</style>
- [Vuejs]-Getting values from modal to main view in VUE
- [Vuejs]-Use Passportjs Local for authentification with Axios Ajax Call And VueJs
Source:stackexchange.com