mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 11:32:57 +08:00
perf: 优化自定义国际化加载路径
This commit is contained in:
parent
d0db747cae
commit
dfba990892
@ -50,7 +50,10 @@ const createI18nOptions = async (): Promise<I18nOptions> => {
|
||||
|
||||
const loadRemoteI18n = async (option: any) => {
|
||||
const name = option.lang.replace('-', '_')
|
||||
const path = PATH_URL.startsWith('./') && PATH_URL.length > 2 ? PATH_URL.substring(1) : PATH_URL
|
||||
const path =
|
||||
PATH_URL.startsWith('./') && PATH_URL.length > 2
|
||||
? window.location.pathname + PATH_URL.substring(2)
|
||||
: PATH_URL
|
||||
const url = `${path}/i18n/custom_${name}_front_${option.name}.js`
|
||||
return await import(url)
|
||||
}
|
||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit af394f2d3a12de818c7a97c0f9c7989cd14fcabc
|
||||
Subproject commit feab899f0f951256b53eeff612d18427be358bed
|
Loading…
Reference in New Issue
Block a user