0👍
You can’t pass prop to Sass directly. You have to use a dynamic style
prop like that:
<template>
ButtonFilled(:style="{backgroundColor: green}")
...
</template>
<script>
export default {
props: ['green']
...
}
...
(you can also refer to this answer)
This will add a background-color
CSS property to element with the value of green
.
- [Vuejs]-Vue.js refresh page when tapping a button
- [Vuejs]-Liquor tree drag and drop – how to prevent drop/create a parent node from a dragged child node (Vuejs)
Source:stackexchange.com