import Vue from 'vue'
...
import VueI18n from 'vue-i18n'
import f from '@/plugins/lib'
import * as messages from '@/assets/translate.json'
Vue.use(VueI18n)
Vue.use(f)
...
export const i18n = new VueI18n({ <------- вот здесь
locale: 'ru',
messages
})
new Vue({
i18n,
render: h => h(App)
}).$mount('#app')
import { i18n } from '../main.js' <--------
export default {
install (Vue) {
const fn = {
getBirthLabel (year, month, day) {
let label = ''
if (day) label += `${day} `
if (month) label += `${i18n.t('month')} ` <-------
if (year) label += year
return label
}
}
Vue.prototype.$f = fn
}
}
import Vue from 'vue'
...
import VueI18n from 'vue-i18n'
import f from '@/plugins/lib'
Vue.use(VueI18n)
Vue.use(f)
...
const i18n = new VueI18n({
locale: 'ru',
messages
})
new Vue({
i18n,
render: h => h(App)
}).$mount('#app')
export default {
install (Vue) {
const fn = {
getBirthLabel (year, month, day) {
let label = ''
if (day) label += `${day} `
if (month) label += `${this.$t('month')} `
if (year) label += year
return label
}
}
Vue.prototype.$f = fn
}
}
Nov 8 11:47:01 team kernel: [138224.392750] nouveau 0000:01:00.0: fifo: CACHE_ERROR - ch 8 [thunderbird[23886]] subc 5 mthd 0180 data beef0301
Nov 8 11:47:01 team kernel: [138224.395022] nouveau 0000:01:00.0: fifo: CACHE_ERROR - ch 8 [thunderbird[23886]] subc 5 mthd 0184 data beef0201
...
Nov 8 11:47:02 team kernel: [138224.486006] nouveau 0000:01:00.0: gr: TRAP_CCACHE 00000001 [FAULT]
Nov 8 11:47:02 team kernel: [138224.486019] nouveau 0000:01:00.0: gr: TRAP_CCACHE 000e0080 00000000 00000000 00000000 00000000 00000004 00000000
Nov 8 11:47:02 team kernel: [138224.486021] nouveau 0000:01:00.0: gr: 00200000 [] ch 8 [001f65f000 thunderbird[23886]] subc 3 class 8597 mthd 13bc data 00000054
Nov 8 11:47:02 team kernel: [138224.486036] nouveau 0000:01:00.0: fb: trapped read at 002027ff00 on channel 8 [1f65f000 thunderbird[23886]] engine 00 [PGRAPH] client 05 [CCACHE] subclient 00 [CB] reason 00000006 [NULL_DMAOBJ]
Nov 8 11:47:04 team kernel: [138227.253320] nouveau 0000:01:00.0: gr: PGRAPH TLB flush idle timeout fail
...
Nov 8 11:47:16 team kernel: [138239.395879] nouveau 0000:01:00.0: thunderbird[23886]: failed to idle channel 8 [thunderbird[23886]]
import axios from 'axios'
export function load (command, { result, callback, data, method }) {
axios({
url: `${process.env.VUE_APP_API_URL}/${command}`,
method: method || 'post',
data: data || {}
}).then(response => {
if (result) {
result.data = response.data
result.status = response.status
result.success = response.data.success
}
}).catch(error => {
if (error.response) {
if (result) {
result.data = error.response.data
result.status = error.response.status
}
} else if (error.request) {
if (result) {
result.error = error.message
}
}
}).then(() => {
if (callback) callback()
})
}
import { load } from '@/lib.js'
Vue.prototype.load = load
var vm = new Vue(...)
myLoginRoutine({ this, this }).then...
?
router/index.js
По-моему, вполне...