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 // accessor
import { accessor as neko } from './store' import { accessor as neko } from './store'
import { PluginObject } from 'vue'
// Plugins // Plugins
import Logger from './plugins/log' import Logger from './plugins/log'
import Client from './plugins/neko' import Client from './plugins/neko'
import Axios from './plugins/axios' import Axios from './plugins/axios'
import Swal from './plugins/swal' import Swal from './plugins/swal'
import Anime from './plugins/anime' import Anime from './plugins/anime'
import { i18n } from './plugins/i18n'
// Components // Components
import Connect from '~/components/connect.vue' import Connect from '~/components/connect.vue'
@ -21,6 +22,9 @@ import Header from '~/components/header.vue'
const exportMixin = { const exportMixin = {
computed: { computed: {
beforeCreate () {
console.log('Creating neko component', this)
},
$accessor() { $accessor() {
return neko 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) { function extend (component: any) {
return component return component
.use(plugini18n)
.use(Logger) .use(Logger)
.use(Axios) .use(Axios)
.use(Swal) .use(Swal)