feat: add i18n

This commit is contained in:
xingyu4j
2025-10-21 17:42:02 +08:00
parent d44ff7006a
commit 5203b991de
13 changed files with 29 additions and 23 deletions

View File

@@ -80,7 +80,7 @@ async function handleStatusChange(
ElMessage.success(`${text}成功`);
resolve(true);
} else {
reject(new Error('操作失败'));
reject(new Error($t('ui.actionMessage.operationFailed')));
}
})
.catch(() => {

View File

@@ -145,7 +145,7 @@ async function handleStatusChange(
ElMessage.success(`${text}成功`);
resolve(true);
} else {
reject(new Error('操作失败'));
reject(new Error($t('ui.actionMessage.operationFailed')));
}
})
.catch(() => {

View File

@@ -70,7 +70,7 @@ async function handleStatusChange(
ElMessage.success(`${text}成功`);
resolve(true);
} else {
reject(new Error('操作失败'));
reject(new Error($t('ui.actionMessage.operationFailed')));
}
})
.catch(() => {

View File

@@ -133,7 +133,7 @@ async function handleExport() {
<template #icon>
<IconifyIcon icon="lucide:download" />
</template>
导出
{{ $t('page.action.export') }}
</ElButton>
</ShortcutDateRangePicker>
</div>

View File

@@ -18,8 +18,8 @@ import {
isSameDay,
} from '@vben/utils';
import { ElButton, ElCard, ElCol, ElRow } from 'element-plus';
import dayjs from 'dayjs';
import { ElButton, ElCard, ElCol, ElRow } from 'element-plus';
import * as TradeStatisticsApi from '#/api/mall/statistics/trade';
import ShortcutDateRangePicker from '#/components/shortcut-date-range-picker/shortcut-date-range-picker.vue';
@@ -123,7 +123,11 @@ async function handleExport() {
<!-- 查询条件 -->
<div class="flex items-center gap-2">
<ShortcutDateRangePicker @change="handleDateRangeChange">
<ElButton class="ml-4" @click="handleExport" :loading="exportLoading">
<ElButton
class="ml-4"
@click="handleExport"
:loading="exportLoading"
>
<template #icon>
<IconifyIcon icon="lucide:download" />
</template>
@@ -279,4 +283,3 @@ async function handleExport() {
</div>
</ElCard>
</template>