From 50e95b985a72fcec4a93a2470e9efdfb2620148a Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期四, 02 四月 2026 15:46:09 +0800
Subject: [PATCH] #i18n
---
rsf-design/src/views/system/config/index.vue | 34 ++++++++++++++++++++--------------
1 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/rsf-design/src/views/system/config/index.vue b/rsf-design/src/views/system/config/index.vue
index a879fe6..9d591b9 100644
--- a/rsf-design/src/views/system/config/index.vue
+++ b/rsf-design/src/views/system/config/index.vue
@@ -12,7 +12,9 @@
<ArtTableHeader v-model:columns="columnChecks" :loading="loading" @refresh="refreshData">
<template #left>
<ElSpace wrap>
- <ElButton v-auth="'add'" @click="showDialog('add')" v-ripple>鏂板閰嶇疆</ElButton>
+ <ElButton v-auth="'add'" @click="showDialog('add')" v-ripple>
+ {{ t('pages.system.config.buttons.add') }}
+ </ElButton>
<ElButton
v-auth="'delete'"
type="danger"
@@ -20,7 +22,7 @@
@click="handleBatchDelete"
v-ripple
>
- 鎵归噺鍒犻櫎
+ {{ t('common.actions.batchDelete') }}
</ElButton>
</ElSpace>
</template>
@@ -53,6 +55,7 @@
<script setup>
import { ElMessage } from 'element-plus'
+ import { useI18n } from 'vue-i18n'
import { useAuth } from '@/hooks/core/useAuth'
import { useTable } from '@/hooks/core/useTable'
import { useCrudPage } from '@/views/system/common/useCrudPage'
@@ -79,6 +82,7 @@
defineOptions({ name: 'Config' })
+ const { t } = useI18n()
const { hasAuth } = useAuth()
const searchForm = ref(createConfigSearchState())
const detailDrawerVisible = ref(false)
@@ -88,41 +92,42 @@
const searchItems = computed(() => [
{
- label: '鍏抽敭瀛�',
+ label: t('table.keyword'),
key: 'condition',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ラ厤缃悕绉�'
+ placeholder: t('pages.system.config.search.conditionPlaceholder')
}
},
{
- label: '鏍囪瘑',
+ label: t('pages.system.config.table.flag'),
key: 'flag',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ラ厤缃爣璇�'
+ placeholder: t('pages.system.config.search.flagPlaceholder')
}
},
{
- label: '绫诲瀷',
+ label: t('pages.system.config.table.type'),
key: 'type',
type: 'select',
props: {
clearable: true,
- options: getConfigTypeOptions()
+ placeholder: t('pages.system.config.placeholders.type'),
+ options: getConfigTypeOptions(t)
}
},
{
- label: '鐘舵��',
+ label: t('table.status'),
key: 'status',
type: 'select',
props: {
clearable: true,
options: [
- { label: '姝e父', value: 1 },
- { label: '鍐荤粨', value: 0 }
+ { label: t('common.status.normal'), value: 1 },
+ { label: t('common.status.frozen'), value: 0 }
]
}
}
@@ -136,7 +141,7 @@
} catch (error) {
detailDrawerVisible.value = false
detailData.value = {}
- ElMessage.error(error?.message || '鑾峰彇閰嶇疆璇︽儏澶辫触')
+ ElMessage.error(error?.message || t('pages.system.config.messages.detailFailed'))
} finally {
detailLoading.value = false
}
@@ -148,7 +153,7 @@
dialogVisible.value = true
dialogType.value = 'edit'
} catch (error) {
- ElMessage.error(error?.message || '鑾峰彇閰嶇疆璇︽儏澶辫触')
+ ElMessage.error(error?.message || t('pages.system.config.messages.detailFailed'))
}
}
@@ -174,6 +179,7 @@
paginationKey: getConfigPaginationKey(),
columnsFactory: () =>
createConfigTableColumns({
+ t,
handleView: openDetail,
handleEdit: openEditDialog,
handleDelete: hasAuth('delete') ? (row) => handleDeleteAction?.(row) : null
@@ -206,7 +212,7 @@
saveRequest: fetchSaveConfig,
updateRequest: fetchUpdateConfig,
deleteRequest: fetchDeleteConfig,
- entityName: '閰嶇疆',
+ entityName: t('pages.system.config.entity'),
resolveRecordLabel: (record) => record?.name || record?.flag || record?.id,
refreshCreate,
refreshUpdate,
--
Gitblit v1.9.1