|
|
@ -5,7 +5,7 @@ |
|
|
width="300px" |
|
|
width="300px" |
|
|
:close-on-click-modal="false" |
|
|
:close-on-click-modal="false" |
|
|
append-to-body |
|
|
append-to-body |
|
|
class="language-switch-dialog" |
|
|
|
|
|
|
|
|
class="lang-switch-dialog" |
|
|
> |
|
|
> |
|
|
<el-form label-width="80px"> |
|
|
<el-form label-width="80px"> |
|
|
<el-form-item label="切换语言"> |
|
|
<el-form-item label="切换语言"> |
|
|
@ -83,9 +83,14 @@ const open = () => { |
|
|
// 确认修改 |
|
|
// 确认修改 |
|
|
const handleConfirm = () => { |
|
|
const handleConfirm = () => { |
|
|
locale.value = tempLang.value |
|
|
locale.value = tempLang.value |
|
|
localStorage.setItem('language', tempLang.value) |
|
|
|
|
|
|
|
|
localStorage.setItem('lang', tempLang.value) |
|
|
ElMessage.success(`语言已切换为:${getLangLabel(tempLang.value)}`) |
|
|
ElMessage.success(`语言已切换为:${getLangLabel(tempLang.value)}`) |
|
|
dialogVisible.value = false |
|
|
dialogVisible.value = false |
|
|
|
|
|
|
|
|
|
|
|
// 触发页面刷新以重新加载数据 |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
window.location.reload() |
|
|
|
|
|
}, 500) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
defineExpose({ |
|
|
defineExpose({ |
|
|
|