update i18n

This commit is contained in:
2023-07-17 15:47:45 +08:00
parent 2bc08f4a39
commit 1f3f9d7b31
94 changed files with 1215 additions and 478 deletions

View File

@ -4,7 +4,9 @@ import {
ElNotification,
ElLoading,
} from "element-plus";
import i18n from "@/i18n";
const { t } = i18n.global;
let loadingInstance;
export default {
@ -26,19 +28,21 @@ export default {
},
// 弹出提示
alert(content) {
ElMessageBox.alert(content, "系统提示");
ElMessageBox.alert(content, t("common.systemPrompt"));
},
// 错误提示
alertError(content) {
ElMessageBox.alert(content, "系统提示", { type: "error" });
void ElMessageBox.alert(content, t("common.systemPrompt"), {
type: "error",
});
},
// 成功提示
alertSuccess(content) {
ElMessageBox.alert(content, "系统提示", { type: "success" });
ElMessageBox.alert(content, t("common.systemPrompt"), { type: "success" });
},
// 警告提示
alertWarning(content) {
ElMessageBox.alert(content, "系统提示", { type: "warning" });
ElMessageBox.alert(content, t("common.systemPrompt"), { type: "warning" });
},
// 通知提示
notify(content) {
@ -58,17 +62,17 @@ export default {
},
// 确认窗体
confirm(content) {
return ElMessageBox.confirm(content, "系统提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
return ElMessageBox.confirm(content, t("common.systemPrompt"), {
confirmButtonText: t("common.confirm"),
cancelButtonText: t("common.confirm"),
type: "warning",
});
},
// 提交内容
prompt(content) {
return ElMessageBox.prompt(content, "系统提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
return ElMessageBox.prompt(content, t("common.systemPrompt"), {
confirmButtonText: t("common.confirm"),
cancelButtonText: t("common.confirm"),
type: "warning",
});
},