feat: add i18n
This commit is contained in:
@@ -80,7 +80,7 @@ async function handleStatusChange(
|
||||
ElMessage.success(`${text}成功`);
|
||||
resolve(true);
|
||||
} else {
|
||||
reject(new Error('操作失败'));
|
||||
reject(new Error($t('ui.actionMessage.operationFailed')));
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@@ -145,7 +145,7 @@ async function handleStatusChange(
|
||||
ElMessage.success(`${text}成功`);
|
||||
resolve(true);
|
||||
} else {
|
||||
reject(new Error('操作失败'));
|
||||
reject(new Error($t('ui.actionMessage.operationFailed')));
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@@ -70,7 +70,7 @@ async function handleStatusChange(
|
||||
ElMessage.success(`${text}成功`);
|
||||
resolve(true);
|
||||
} else {
|
||||
reject(new Error('操作失败'));
|
||||
reject(new Error($t('ui.actionMessage.operationFailed')));
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@@ -133,7 +133,7 @@ async function handleExport() {
|
||||
<template #icon>
|
||||
<IconifyIcon icon="lucide:download" />
|
||||
</template>
|
||||
导出
|
||||
{{ $t('page.action.export') }}
|
||||
</ElButton>
|
||||
</ShortcutDateRangePicker>
|
||||
</div>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user