locale开放loadData接口
This commit is contained in:
parent
97cae3d9ac
commit
2d77b5d4a1
|
|
@ -17,7 +17,7 @@ export declare class Locales<ED extends EntityDict & BaseEntityDict> extends Fea
|
|||
constructor(cache: Cache<ED>, localStorage: LocalStorage, environment: Environment, defaultLng: string);
|
||||
private detectLanguange;
|
||||
private reloadDataset;
|
||||
private loadServerData;
|
||||
loadServerData;
|
||||
/**
|
||||
* 当发生key缺失时,向服务器请求最新的i18n数据,对i18n缓存数据的行为优化放在cache中统一进行
|
||||
* @param ns
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ export class Locales<ED extends EntityDict & BaseEntityDict> extends Feature {
|
|||
}
|
||||
}
|
||||
|
||||
private async loadServerData(nss: string[]) {
|
||||
async loadServerData(nss: string[]) {
|
||||
const { data: newI18ns } = await this.cache.refresh('i18n', {
|
||||
data: {
|
||||
id: 1,
|
||||
|
|
|
|||
Loading…
Reference in New Issue