Skip to content

Commit

Permalink
Using the translate mixin in page table
Browse files Browse the repository at this point in the history
  • Loading branch information
nWidart committed Sep 12, 2017
1 parent 4f7c3c0 commit 8b7130e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Modules/Page/Assets/js/components/PageTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<data-tables :data="data" :actions-def="actionsDef">
<el-table-column prop="id" label="Id" width="100">
</el-table-column>
<el-table-column prop="title" label="Title">
<el-table-column prop="title" :label="translate('page', 'title')">
</el-table-column>
<el-table-column prop="slug" label="Slug">
</el-table-column>
Expand All @@ -21,15 +21,17 @@

<script>
import axios from 'axios'
import Translate from '../../../../Core/Assets/js/mixins/Translate'
let data;
export default {
mixins: [Translate],
data() {
return {
data,
actionsDef: {
def: [{
name: 'Create a page',
name: this.translate('page', 'create page'),
icon: 'edit',
handler: () => {
window.location = route('admin.page.page.create');
Expand All @@ -48,7 +50,7 @@
},
goToEdit(scope) {
window.location = scope.row.urls.edit_url;
}
},
},
mounted() {
this.fetchData();
Expand Down

0 comments on commit 8b7130e

Please sign in to comment.