Using the translate mixin in page table

parent 4f7c3c08
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<data-tables :data="data" :actions-def="actionsDef"> <data-tables :data="data" :actions-def="actionsDef">
<el-table-column prop="id" label="Id" width="100"> <el-table-column prop="id" label="Id" width="100">
</el-table-column> </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>
<el-table-column prop="slug" label="Slug"> <el-table-column prop="slug" label="Slug">
</el-table-column> </el-table-column>
...@@ -21,15 +21,17 @@ ...@@ -21,15 +21,17 @@
<script> <script>
import axios from 'axios' import axios from 'axios'
import Translate from '../../../../Core/Assets/js/mixins/Translate'
let data; let data;
export default { export default {
mixins: [Translate],
data() { data() {
return { return {
data, data,
actionsDef: { actionsDef: {
def: [{ def: [{
name: 'Create a page', name: this.translate('page', 'create page'),
icon: 'edit', icon: 'edit',
handler: () => { handler: () => {
window.location = route('admin.page.page.create'); window.location = route('admin.page.page.create');
...@@ -48,7 +50,7 @@ ...@@ -48,7 +50,7 @@
}, },
goToEdit(scope) { goToEdit(scope) {
window.location = scope.row.urls.edit_url; window.location = scope.row.urls.edit_url;
} },
}, },
mounted() { mounted() {
this.fetchData(); this.fetchData();
......
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