does anyone know of a way to dynamically render vue.js components? For example, I have a table component that should render different buttons based on the prop definition:
Vue.component('my_table', {
template: '#my_table',
props: {
data: Array,
columns: Array,
actions: Array
}
});
Ideally, my template would be defined in the tmpl value of my action object:
<tbody>
<tr v-for="entry in data">
<td v-for="key in columns">
{{entry[key.field]}}
</td>
<td v-for="action in actions">
{{ action.tmpl }}
</td>
</tr>
</tbody>
Here's my fiddle:
https://jsfiddle.net/zfya92dh/43/
Anyone have any ideas?
Thanks in advance!