JSFiddle - React, Tailwind, and code Playground
by justin_barber_arvig
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.16/vue.js"></script>
<div id="vue-instance">
<ul>
<li v-for="step in stepz">
{{ step.name }} - {{ step.loading }}
</li>
</ul>
</div>
JavaScript
var vm = new Vue({
el: '#vue-instance',
data: {
steps: [
{name: 'Step 1'},
{name: 'Step 2'},
{name: 'Step 3'},
{name: 'Step 4'}
]
},
computed: {
stepz: function() {
return this.steps.map( (step) => {
step.loading = false
return step
});
}
}
});