feat:不用t的useI18n,对文本替换失效。action配置prefix的url中段

This commit is contained in:
lvjunzhao
2025-01-16 10:39:26 +08:00
parent b1cef39a1e
commit 8c739ec49d

View File

@ -57,7 +57,7 @@
async function open() {
data.visible = true;
data.action = getAppEnvConfig().VITE_GLOB_API_URL + '/workflow/schema/import?cover='+props.coverType;
data.action = getAppEnvConfig().VITE_GLOB_API_URL + (getAppEnvConfig().VITE_GLOB_API_URL_PREFIX|| '') + '/workflow/schema/import?cover='+props.coverType;
data.headers.Authorization = `Bearer ${getToken()}`;
}
function close() {
@ -70,13 +70,13 @@
}
if (info.file.status === 'done') {
if (info.file && info.file.response && info.file.response.code == 0) {
message.success(t(`{name}导入成功!`, { name: info.file.name }));
message.success(`${info.file.name}导入成功!`);
close();
} else {
message.error(t('导入流程失败!'+ info.file.response.msg));
message.error('导入流程失败!'+ info.file.response.msg);
}
} else if (info.file.status === 'error') {
message.error(t(`{name}上传失败.`, { name: info.file.name }));
message.error(`${info.file.name}上传失败.`);
}
}
</script>