Using ES6 syntax everywhere

parent 34e1835f
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
}).then(() => { }).then(() => {
let vm = this; let vm = this;
axios.delete(this.scope.row.urls.delete_url) axios.delete(this.scope.row.urls.delete_url)
.then(function (response) { .then(response => {
if (response.data.errors === false) { if (response.data.errors === false) {
vm.$message({ vm.$message({
type: 'success', type: 'success',
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
vm.rows.splice(vm.scope.$index, 1); vm.rows.splice(vm.scope.$index, 1);
} }
}) })
.catch(function (error) { .catch(error => {
vm.$message({ vm.$message({
type: 'error', type: 'error',
message: response.data.message message: response.data.message
......
...@@ -30,16 +30,16 @@ ...@@ -30,16 +30,16 @@
} }
}, },
methods: { methods: {
fetchData: function () { fetchData() {
let vm = this; let vm = this;
axios.get(route('api.page.page.index')) axios.get(route('api.page.page.index'))
.then(function (response) { .then(response => {
vm.data = response.data.data; vm.data = response.data.data;
}) })
.catch(function (response) { .catch(response => {
}); });
}, },
goToEdit: function (scope) { goToEdit(scope) {
window.location = scope.row.urls.edit_url; 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