JSFiddle - React, Tailwind, and code Playground
by Pankaj Kargirwar
HTML
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<div id="app">
<table>
<tr>
<td v-for="l in list" v-bind:class="l.style" @click="onClick >{{l.v}}</td>
</tr>
</table>
</div>
CSS
.bold {
font-weight: bold
}
td {
cursor: pointer
}
JavaScript
new Vue({
el: '#app',
data: {
list: []
},
created: function() {
this.list.push({
v: 1,
style: {
bold: true
}
}
);
this.list.push({
v: 2,
style: {
bold: false
}
}
)
}
})