-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set a color with v-if #246
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello guys,
Thank you for this awesome feature.
How do I set a default color if some conditions matches, for exemple:
The user can set a background color and, in the next step, can add a text on it. If the user set the background color as black, when the color picker open, the set color for text will be red, if not, white
Is that possible ?
this is my code:
<div class="column is-narrow"> <div>Textfarbe:</div> <div class="font-button" :style="{ background: textObject.fill}" @click="fontColorBoxOpen = true" /> <div v-if="fontColorBoxOpen" class="font-color-box" v-click-outside="closeFontColorBox"> <color-picker :color="defaultColor" @input="updateTextColor" v-model="textObject.fill" /> </div> </div>
I use computed to change the
:color="defaultColor"
in data, but it does not workThanks!
The text was updated successfully, but these errors were encountered: