Vue: v-bind:style= "[condition ? {styleA} : {styleB}]" use inside the v-for is unexpected?

Created on 16 Nov 2016  ·  2Comments  ·  Source: vuejs/vue

I want to add some inline-style to every img label,but need some judge...

qq20161116-1 2x

My data structure is like that...

qq20161116-1

but the result is unexpected

qq20161116-0

All 2 comments

Your width and height are strings...

'1080' < '400' // true

😯...

一语道破,期待周五的 StuQ 大神直播会~

还有那个知乎 Live ~

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bfis picture bfis  ·  3Comments

hiendv picture hiendv  ·  3Comments

loki0609 picture loki0609  ·  3Comments

paceband picture paceband  ·  3Comments

bdedardel picture bdedardel  ·  3Comments