i want to use a function to set individual content of table cells.
In this example i want to wrap the status with the <strong> - Tag
(I dont edit the template, because at my application it's stored in a component, which is used multiple times ...)
tableData: [
{
"name": "test1",
"status": "1"
},
{
"name": "test2",
"status": "0"
},
{
"name": "test3",
"status": "1"
}
],
columns: {
name: {
title: "name"
},
status: {
title: "status",
content: function(entry) {
return "<strong>" + entry.status + "</strong>";
}
}
}
I tried smth like value.content.call() in the v-for loop, but this doesnt work.
JsFiddle: https://jsfiddle.net/7anuorbu/4/