feat: 前端完成适配后端api

This commit is contained in:
2025-07-11 21:44:23 +08:00
parent 8789d6f9ee
commit da6386c6f0
3 changed files with 339 additions and 156 deletions

View File

@@ -50,10 +50,31 @@ const [useAlertProvider, useAlertStore] = createInjectionState(() => {
}
}
// Convenience methods for different alert types
function error(message: string, duration = 2000) {
show(message, "error", duration);
}
function info(message: string, duration = 2000) {
show(message, "info", duration);
}
function warn(message: string, duration = 2000) {
show(message, "warning", duration);
}
function success(message: string, duration = 2000) {
show(message, "success", duration);
}
return {
alertState,
show,
hide,
error,
info,
warn,
success,
};
});