Condição no v-bind: Style - VueJS
Tenho uma pergunta fácil e espero que você possa ajudar:
<div>
<figure :style="{ 'background': 'url(' + item.main_featured + ') center no-repeat' }">
</div>
Quero que o atributo de estilo 'background' retorne cor se o URL da API não estiver definido
Exemplo:
Se item.featured_photo não for nulo:
<figure style="background: url('localhost:6969/image.img') center no-repeat">
Se item.featured_photo for nulo:
<figure style="background: #FFF">