Registering the TranslationHelper mixin globally to access it from anywhere

parent 532531d4
...@@ -3,10 +3,7 @@ ...@@ -3,10 +3,7 @@
</template> </template>
<script> <script>
import TranslationHelper from '../../../../Core/Assets/js/mixins/TranslationHelper'
export default { export default {
mixins: [TranslationHelper],
props: { props: {
rows: {default: null}, rows: {default: null},
scope: {default: null}, scope: {default: null},
......
...@@ -150,12 +150,11 @@ ...@@ -150,12 +150,11 @@
<script> <script>
import axios from 'axios' import axios from 'axios'
import Slugify from '../../../../Core/Assets/js/mixins/Slugify' import Slugify from '../../../../Core/Assets/js/mixins/Slugify'
import TranslationHelper from '../../../../Core/Assets/js/mixins/TranslationHelper'
import ShortcutHelper from '../../../../Core/Assets/js/mixins/ShortcutHelper' import ShortcutHelper from '../../../../Core/Assets/js/mixins/ShortcutHelper'
import Form from 'form-backend-validation' import Form from 'form-backend-validation'
export default { export default {
mixins: [Slugify, TranslationHelper, ShortcutHelper], mixins: [Slugify, ShortcutHelper],
props: { props: {
locales: {default: null}, locales: {default: null},
pageTitle: {default: null, String}, pageTitle: {default: null, String},
......
...@@ -30,12 +30,10 @@ ...@@ -30,12 +30,10 @@
<script> <script>
import axios from 'axios' import axios from 'axios'
import TranslationHelper from '../../../../Core/Assets/js/mixins/TranslationHelper'
let data; let data;
export default { export default {
mixins: [TranslationHelper],
data() { data() {
return { return {
data, data,
......
...@@ -98,13 +98,12 @@ ...@@ -98,13 +98,12 @@
<script> <script>
import axios from 'axios' import axios from 'axios'
import _ from "lodash"; import _ from "lodash";
import TranslationHelper from '../../../../Core/Assets/js/mixins/TranslationHelper'
import ShortcutHelper from '../../../../Core/Assets/js/mixins/ShortcutHelper' import ShortcutHelper from '../../../../Core/Assets/js/mixins/ShortcutHelper'
let data; let data;
export default { export default {
mixins: [TranslationHelper, ShortcutHelper], mixins: [ShortcutHelper],
data() { data() {
return { return {
data, data,
......
This diff is collapsed.
...@@ -12,6 +12,8 @@ Vue.use(DataTables, { locale }); ...@@ -12,6 +12,8 @@ Vue.use(DataTables, { locale });
Vue.use(VueI18n); Vue.use(VueI18n);
Vue.use(VueRouter); Vue.use(VueRouter);
Vue.use(require('vue-shortkey'), { prevent: ['input', 'textarea'] }); Vue.use(require('vue-shortkey'), { prevent: ['input', 'textarea'] });
require('./mixins');
Vue.component('ckeditor', require('../../../Modules/Core/Assets/js/components/CkEditor.vue')); Vue.component('ckeditor', require('../../../Modules/Core/Assets/js/components/CkEditor.vue'));
Vue.component('DeleteButton', require('../../../Modules/Core/Assets/js/components/DeleteComponent.vue')); Vue.component('DeleteButton', require('../../../Modules/Core/Assets/js/components/DeleteComponent.vue'));
......
import Vue from 'vue'
import TranslationHelper from '../../../Modules/Core/Assets/js/mixins/TranslationHelper'
Vue.mixin(TranslationHelper);
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