Skip to content

Commit

Permalink
fix: 切换中英文后需要手动刷新才能正确显示 #3146
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 12765
  • Loading branch information
hLinx committed Jul 22, 2024
1 parent 3a43d1b commit d36cef8
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@
});
setLocale(lang);
jsonp(`${this.envConfig['esb.url']}/api/c/compapi/v2/usermanage/fe_update_user_language/?language=${lang.toLocaleLowerCase()}`);
window.location.reload();
},
/**
* @desc 显示版本更新日志
Expand Down
4 changes: 1 addition & 3 deletions src/frontend/src/i18n/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ const i18n = new VueI18n({
messages,
});

console.log('i18n = ', i18n);

if (localeLanguage === 'zh-CN') {
locale.use(lang.zhCN);
} else {
Expand All @@ -79,7 +77,7 @@ export const loadLanguage = (localPackage) => {
export const setLocale = (locale) => {
const realLocal = locale === 'en' ? 'en-US' : 'zh-CN';
if (Object.prototype.hasOwnProperty.call(messages, realLocal)) {
i18n.locale = realLocal;
i18n._vm.locale = realLocal; // eslint-disable-line no-underscore-dangle
document.querySelector('html').setAttribute('lang', realLocal);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@
this.isGrammarError = true;
return;
}
console.log('valueList = ', dayOfMonth, dayOfWeek);
try {
this.checkAndTranslate(value);
Expand Down
1 change: 0 additions & 1 deletion src/frontend/src/views/script-manage/version/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,6 @@
* @returns { Boolean }
*/
isCopyCreateDisabled() {
console.log('isCopyCreateDisabled =', this.dataMemo, !!_.find(this.dataMemo, scriptVersion => scriptVersion.isDraft));
return !!_.find(this.dataMemo, scriptVersion => scriptVersion.isDraft);
},
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@
.reduce((result, item) => Object.assign(result, {
[item.name]: item,
}), {});
console.log('lastExecuteVariableMap = ', this.planId, lastExecuteVariableMap);
const replaceVariableValue = (variableList, lastExecuteVariableMap) => {
const variableListResult = [...variableList];
Expand Down

0 comments on commit d36cef8

Please sign in to comment.