chore: remove i18n (#1828)

This commit is contained in:
花裤衩
2019-05-05 16:49:40 +08:00
committed by GitHub
parent e8e6c7e79c
commit 00a19db299
63 changed files with 317 additions and 1440 deletions

View File

@@ -1,13 +1,10 @@
import defaultSettings from '@/settings'
import i18n from '@/lang'
const title = defaultSettings.title || 'Vue Element Admin'
export default function getPageTitle(key) {
const hasKey = i18n.te(`route.${key}`)
if (hasKey) {
const pageName = i18n.t(`route.${key}`)
return `${pageName} - ${title}`
export default function getPageTitle(pageTitle) {
if (pageTitle) {
return `${pageTitle} - ${title}`
}
return `${title}`
}

View File

@@ -1,12 +0,0 @@
// translate router.meta.title, be used in breadcrumb sidebar tagsview
export function generateTitle(title) {
const hasKey = this.$te('route.' + title)
if (hasKey) {
// $t :this method from vue-i18n, inject in @/lang/index.js
const translatedTitle = this.$t('route.' + title)
return translatedTitle
}
return title
}

View File

@@ -1,5 +1,5 @@
/**
* Created by jiachenpan on 16/11/18.
* Created by PanJiaChen on 16/11/18.
*/
/**

View File

@@ -1,5 +1,5 @@
/**
*Created by jiachenpan on 16/11/29.
*Created by PanJiaChen on 16/11/29.
* @param {Sting} url
* @param {Sting} title
* @param {Number} w

View File

@@ -16,8 +16,9 @@ service.interceptors.request.use(
// do something before request is sent
if (store.getters.token) {
// let each request carry token --['X-Token'] as a custom key.
// please modify it according to the actual situation.
// let each request carry token
// ['X-Token'] is a custom headers key
// please modify it according to the actual situation
config.headers['X-Token'] = getToken()
}
return config
@@ -32,14 +33,14 @@ service.interceptors.request.use(
// response interceptor
service.interceptors.response.use(
/**
* If you want to get information such as headers or status
* If you want to get http information such as headers or status
* Please return response => response
*/
/**
* Determine the request status by custom code
* Here is just an example
* You can also judge the status by HTTP Status Code.
* You can also judge the status by HTTP Status Code
*/
response => {
const res = response.data

View File

@@ -1,5 +1,5 @@
/**
* Created by jiachenpan on 16/11/18.
* Created by PanJiaChen on 16/11/18.
*/
/**