Dynamic assignment to the Style with Vue, format:
<view :style='{样式名:‘+动态变量+’}'
Where css styles to the "-" need to be replaced hump mode
following record a few common styles:
1. Dynamic assignment to the background image
<view :style="{backgroundImage:'url('+item.image+')'}">
When applied to replace the corresponding variable item.image
Loading…