Problem
Imagine we have:
data: {
tables: [{
name: 'iPhone', left: 1, top: 0
},
{
name: 'Mac', left: 150, top: 0
}]
}
How to bind top and left css style property to the values from the table?
Consider:
<div id="table">
<div v-for="table in tables">
<div class="table-div" v-bind:style="{top: table.top + 'px', left: table.left + 'px'}">{{table.name}}</div>
</div>
</div>