Open kentforth opened 4 years ago
I have a view where I use photoshop color picker:
<div class="color-picker"> <photoshop-picker v-model="color"/> </div>
I have an element where I want to change background color:
<textarea name="category-textarea" id="category-textarea" cols="30" rows="1" :style="{ backgroundColor: color }" ></textarea>
I imported it in script area like this:
<script> import { Photoshop } from "vue-color"; export default { components: {"photoshop-picker": Photoshop }, mounted() {}, data() { return { color: "#7163E0" }; } }; </script>
How can I apply color from color picker to background color of textarea?
try
:style="{ 'background-color': color; }"
(not tested)
I have a view where I use photoshop color picker:
I have an element where I want to change background color:
I imported it in script area like this:
How can I apply color from color picker to background color of textarea?