Skip to content
Advertisement

Vuejs Multiple Style bindings?

i have a couple of different styling that needs to apply to a text. I am trying to bind the styles using array syntax as shown in the documentation: https://v2.vuejs.org/v2/guide/class-and-style.html but not sure what i’m doing wrong.

I have created a pen for demonstration: https://codepen.io/anon/pen/orVGNP The computed property style is the one i am trying to apply as well which changes the font style and font weight.

JavaScript

Again it’s just the computed property that i’m having a hard time trying to include in the v-bind: style. thank you for the help everyone!!

Advertisement

Answer

You need to bind the style object differently.

JavaScript

Javascript:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement