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
|
// 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)
|
||||||
|
Loading…
Reference in New Issue
Block a user