Using ES6 syntax everywhere

parent 34e1835f
......@@ -19,7 +19,7 @@
}).then(() => {
let vm = this;
axios.delete(this.scope.row.urls.delete_url)
.then(function (response) {
.then(response => {
if (response.data.errors === false) {
vm.$message({
type: 'success',
......@@ -29,7 +29,7 @@
vm.rows.splice(vm.scope.$index, 1);
}
})
.catch(function (error) {
.catch(error => {
vm.$message({
type: 'error',
message: response.data.message
......
......@@ -30,16 +30,16 @@
}
},
methods: {
fetchData: function () {
fetchData() {
let vm = this;
axios.get(route('api.page.page.index'))
.then(function (response) {
.then(response => {
vm.data = response.data.data;
})
.catch(function (response) {
.catch(response => {
});
},
goToEdit: function (scope) {
goToEdit(scope) {
window.location = scope.row.urls.edit_url;
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment