feat: 更新 openToast 函数,优化消息摘要格式以提高可读性
All checks were successful
/ depcheck (push) Successful in 1m23s
/ playwright (push) Successful in 1m7s
/ build-and-deploy-to-vercel (push) Successful in 1m41s

This commit is contained in:
严浩
2024-12-30 10:59:50 +08:00
parent 6918d26da2
commit 1c53703092

View File

@ -59,8 +59,8 @@ export const openDialog = async () => {
export const openToast = () => {
// ToastService.add({ severity: 'info', summary: '提示', life: 3000, detail: '消息内容' });
// ToastService.add({ severity: 'info', summary: '提示', life: 0, detail: '消息内容' });
['success', 'info', 'warn', 'error', 'secondary', 'contrast', undefined].forEach((severity: any) => {
ToastService.add({ severity, summary: severity, life: 3000, detail: '消息内容' });
['success', 'info', 'warn', 'error', 'secondary', 'contrast', undefined].forEach((severity) => {
ToastService.add({ severity: severity as never, summary: `severity: ${severity}`, life: 5000, detail: '消息内容' });
});
};