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

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

View File

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

View File

@@ -97,7 +97,7 @@ const showInput = async (index: number) => {
const handleInputConfirm = async (index: number, propertyId: number) => {
// 从数组中取最后一个输入的值tags 模式下 inputValue 是数组)
const currentValue = inputValue.value?.[inputValue.value.length - 1]?.trim();
if (currentValue) {
// 1. 重复添加校验
if (
@@ -136,10 +136,10 @@ const handleInputConfirm = async (index: number, propertyId: number) => {
id,
name: currentValue,
});
message.success($t('common.createSuccess'));
message.success($t('ui.actionMessage.operationSuccess'));
emit('success', attributeList.value);
} catch {
message.error('添加失败,请重试');
message.error($t('ui.actionMessage.operationFailed'));
}
}
attributeIndex.value = null;

View File

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

View File

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