feat: 更新 openToast 函数,优化消息摘要格式以提高可读性
This commit is contained in:
@ -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: '消息内容' });
|
||||
});
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user