Registering the TranslationHelper mixin globally to access it from anywhere

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