vue define array code example
Example: vue js array
Vue.createApp({
data() {
return {
items: [{ message: 'Foo' }, { message: 'Bar' }]
}
}
}).mount('#array-rendering')
<ul id="array-rendering" class="demo">
<li v-for="item in items" :key="item.message">
{{ item.message }}
</li>
</ul>