[Vuejs]-Vuejs adding conditional style fails

0👍

Binding an object to the style attribute is done by providing key / value pairs.

I suspect what you want is

<div :style="{'text-decoration': condition ? 'line-through' : 'initial'}">

Leave a comment