I am using vue-tables2 in my app.With the help of 'template' property avilable in vue-table2 options I am able to modify the format of the data.
The sample code is given below
data: {
columns: ['erase'],
options: {
...
templates: {
erase: function (h, row, index) {
return this.test();
}
}
...
},
methods: {
test() {
return 'test';
}
}
}
The code works fine, but when I trying to call a function inside the template it's showing below error
TypeError: this.test is not a function
How can I call a function inside vue-table2 template property?