Archived
2
0
This commit is contained in:
gbrian 2021-03-09 17:16:53 +01:00
parent dc3bb4f837
commit cdeeff680b

View File

@ -1,12 +1,13 @@
// accessor
import { accessor as neko } from './store'
import { PluginObject } from 'vue'
// Plugins
import Logger from './plugins/log'
import Client from './plugins/neko'
import Axios from './plugins/axios'
import Swal from './plugins/swal'
import Anime from './plugins/anime'
import { i18n } from './plugins/i18n'
// Components
import Connect from '~/components/connect.vue'
@ -21,6 +22,9 @@ import Header from '~/components/header.vue'
const exportMixin = {
computed: {
beforeCreate () {
console.log('Creating neko component', this)
},
$accessor() {
return neko
},
@ -30,8 +34,16 @@ const exportMixin = {
},
}
const plugini18n: PluginObject<undefined> = {
install(Vue) {
Vue.prototype.i18n = i18n
Vue.prototype.$t = i18n.t.bind(i18n)
},
}
function extend (component: any) {
return component
.use(plugini18n)
.use(Logger)
.use(Axios)
.use(Swal)