feat 消息队列
This commit is contained in:
@@ -5,10 +5,6 @@
|
||||
"ComputedRef": true,
|
||||
"DirectiveBinding": true,
|
||||
"EffectScope": true,
|
||||
"ElLoading": true,
|
||||
"ElMessage": true,
|
||||
"ElMessageBox": true,
|
||||
"ElNotification": true,
|
||||
"ExtractDefaultPropTypes": true,
|
||||
"ExtractPropTypes": true,
|
||||
"ExtractPublicPropTypes": true,
|
||||
|
||||
@@ -101,7 +101,7 @@ const handleMonitorDialogClose = (done: () => void) => {
|
||||
const filterMessages = (messages: any[]) => {
|
||||
// 如果消息超过5条,则只保留最新的5条
|
||||
if (messages.length > 5) {
|
||||
return messages.slice(0, 5); // 只取前5条最新消息
|
||||
return messages.slice(-5); // 只取最后5条最新消息
|
||||
}
|
||||
|
||||
return messages;
|
||||
|
||||
Reference in New Issue
Block a user