mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-15 14:03:36 +08:00
feat: 添加 message 消息提示函数,兼容 Element Plus 和 Ant Design 两种 Message 风格
This commit is contained in:
@@ -26,7 +26,7 @@ const onLogin = async (formEl: FormInstance | undefined) => {
|
||||
if (valid) {
|
||||
// 模拟登录请求,需根据实际开发进行修改
|
||||
setTimeout(() => {
|
||||
message(transformI18n($t("login.loginSuccess")), "success");
|
||||
message(transformI18n($t("login.loginSuccess")), { type: "success" });
|
||||
loading.value = false;
|
||||
}, 2000);
|
||||
} else {
|
||||
|
||||
@@ -45,12 +45,14 @@ const onUpdate = async (formEl: FormInstance | undefined) => {
|
||||
if (checked.value) {
|
||||
// 模拟请求,需根据实际开发进行修改
|
||||
setTimeout(() => {
|
||||
message(transformI18n($t("login.registerSuccess")), "success");
|
||||
message(transformI18n($t("login.registerSuccess")), {
|
||||
type: "success"
|
||||
});
|
||||
loading.value = false;
|
||||
}, 2000);
|
||||
} else {
|
||||
loading.value = false;
|
||||
message(transformI18n($t("login.tickPrivacy")), "warning");
|
||||
message(transformI18n($t("login.tickPrivacy")), { type: "warning" });
|
||||
}
|
||||
} else {
|
||||
loading.value = false;
|
||||
|
||||
@@ -42,7 +42,9 @@ const onUpdate = async (formEl: FormInstance | undefined) => {
|
||||
if (valid) {
|
||||
// 模拟请求,需根据实际开发进行修改
|
||||
setTimeout(() => {
|
||||
message(transformI18n($t("login.passwordUpdateReg")), "success");
|
||||
message(transformI18n($t("login.passwordUpdateReg")), {
|
||||
type: "success"
|
||||
});
|
||||
loading.value = false;
|
||||
}, 2000);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user