mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
Fix i18n
This commit is contained in:
parent
dc3bb4f837
commit
cdeeff680b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user