style background variable vue

The background setting variable of style

:style="{background: (index+1)==actBar?'url(img/'+item.num+'_active.png) no-repeat':'url(img/'+item.num+'.png) no-repeat'}"

:style="'background-image: url(' + item.appface+')'"

:style="'background-image: url('+'img/level/ml/'+girlCharm(item.level)+'.png'+')'"

:style="'background-image: url('+'/static/img/'+item.domainBg+'.png'+')'">

img's src setting variable

:src="'img/act1_'+dataList.sex+'rule.png'"

The width setting variable of style

:style="{width: giftLen + '%'}"

Guess you like

Origin blog.csdn.net/u013994400/article/details/128135218