Skip to content

Commit

Permalink
fix: dynamic locale value
Browse files Browse the repository at this point in the history
  • Loading branch information
suyuan32 committed Aug 15, 2024
1 parent 8dae2cc commit 87d3e75
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/store/modules/dynamicConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@ export const useDynamicConfigStore = defineStore('app-dynamic-config', {
this.showSettingButton = v.value !== undefined && v.value === 'true';
break;
case 'sys.ui.defaultLocale':
this.defaultLocale = v.value !== undefined ? v.value : LOCALE.ZH_CN;
let localeValue: string = LOCALE.ZH_CN;
if (v.value !== undefined) {
if (v.value === LOCALE.ZH_CN || v.value === LOCALE.EN_US) {
localeValue = v.value;
}
}

this.defaultLocale = localeValue;
break;
case 'sys.ui.header.showNotice':
this.showNotice = v.value !== undefined && v.value === 'true';
Expand Down

0 comments on commit 87d3e75

Please sign in to comment.