locale开放loadData接口

This commit is contained in:
Xu Chang 2024-05-17 15:09:02 +08:00
parent 97cae3d9ac
commit 2d77b5d4a1
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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,