Currently, I am utilizing a solution to dynamically set table cells in a Vue.js component:
http://forum.vuejs.org/topic/526/repeating-table-row-with-slot
This method was effective with Vue.js v1.0.10 but seems to be incompatible with the latest version v1.0.26.
For reference, here is a JsFiddle link: https://jsfiddle.net/peL8fuz3/
The desired markup includes access to the item object within the component:
<div id="vue">
<basic-table>
<table-cell>{{ item.id }}</table-cell>
<table-cell>{{ item.title }}</table-cell>
</basic-table>
</div>
Included below is the Vue.js component code (refer to the fiddle for more details)
Vue.component('basic-table', {
template: '<table><tbody><tr v-for="item in collection" v-slot></tr></tbody></table>',
data: function () {
return {
collection: [
{id: 1, title: 'Vue'},
{id: 2, title: 'Vue 2'},
{id: 3, title: 'Vue 3'},
{id: 4, title: 'Vue 4'},
]
}
}
});
If anyone has insight on how to resolve this issue, please share your thoughts.
Edit I have not yet found a working solution - still actively searching for one.