优化前端双语配置
This commit is contained in:
@@ -129,7 +129,8 @@
|
||||
import { useTable } from '@/hooks/core/useTable'
|
||||
import { useSaiAdmin } from '@/composables/useSaiAdmin'
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { $t } from '@/locales'
|
||||
import TableSearch from './modules/table-search.vue'
|
||||
import EditDialog from './modules/edit-dialog.vue'
|
||||
import WorkDialog from './modules/work-dialog.vue'
|
||||
@@ -252,15 +253,15 @@
|
||||
* @param row
|
||||
*/
|
||||
const handlePassword = (row: any) => {
|
||||
ElMessageBox.prompt('请输入新密码', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
ElMessageBox.prompt($t('page.ui.promptNewPassword'), $t('uiMsg.titlePrompt'), {
|
||||
confirmButtonText: $t('uiMsg.btnOk'),
|
||||
cancelButtonText: $t('uiMsg.btnCancel'),
|
||||
inputPattern: /^.{6,16}$/,
|
||||
inputErrorMessage: '密码长度在6到16之间',
|
||||
inputErrorMessage: $t('page.ui.passwordLengthError'),
|
||||
type: 'warning'
|
||||
}).then(({ value }) => {
|
||||
api.changePassword({ id: row.id, password: value }).then(() => {
|
||||
ElMessage.success('修改密码成功')
|
||||
ElMessage.success($t('page.ui.passwordChanged'))
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -270,13 +271,13 @@
|
||||
* @param row
|
||||
*/
|
||||
const handleCache = (row: any) => {
|
||||
ElMessageBox.confirm('确定要清理缓存吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
ElMessageBox.confirm($t('page.ui.clearCacheConfirm'), $t('uiMsg.titlePrompt'), {
|
||||
confirmButtonText: $t('uiMsg.btnOk'),
|
||||
cancelButtonText: $t('uiMsg.btnCancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
api.clearCache({ id: row.id }).then(() => {
|
||||
ElMessage.success('清理缓存成功')
|
||||
ElMessage.success($t('uiMsg.clearCacheSuccess'))
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user