mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
fix(components): [message] max affects grouping display (#18189)
fix(components): [message] Fix message grouping with max limit Prioritize grouping logic over max limit in message component closed #18117
This commit is contained in:
parent
0760b06b18
commit
2dbe2bf4af
@ -158,10 +158,6 @@ const message: MessageFn &
|
|||||||
) => {
|
) => {
|
||||||
if (!isClient) return { close: () => undefined }
|
if (!isClient) return { close: () => undefined }
|
||||||
|
|
||||||
if (isNumber(messageConfig.max) && instances.length >= messageConfig.max) {
|
|
||||||
return { close: () => undefined }
|
|
||||||
}
|
|
||||||
|
|
||||||
const normalized = normalizeOptions(options)
|
const normalized = normalizeOptions(options)
|
||||||
|
|
||||||
if (normalized.grouping && instances.length) {
|
if (normalized.grouping && instances.length) {
|
||||||
@ -175,6 +171,10 @@ const message: MessageFn &
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isNumber(messageConfig.max) && instances.length >= messageConfig.max) {
|
||||||
|
return { close: () => undefined }
|
||||||
|
}
|
||||||
|
|
||||||
const instance = createMessage(normalized, context)
|
const instance = createMessage(normalized, context)
|
||||||
|
|
||||||
instances.push(instance)
|
instances.push(instance)
|
||||||
|
Loading…
Reference in New Issue
Block a user