diff --git a/src/carousel/src/Carousel.tsx b/src/carousel/src/Carousel.tsx index ac5a3f1daac..ee8c877eff6 100644 --- a/src/carousel/src/Carousel.tsx +++ b/src/carousel/src/Carousel.tsx @@ -739,8 +739,10 @@ export default defineComponent({ } function handleSlideResize(): void { if (autoSlideSizeRef.value) { - slideSizesRef.effect.scheduler?.() - slideSizesRef.effect.run() + // slideSizesRef.effect.scheduler?.() + // slideSizesRef.effect.run() + ;(slideSizesRef.effect as any).scheduler?.() + ;(slideSizesRef.effect as any).run() } } function handleMouseenter(): void { diff --git a/src/mention/src/Mention.tsx b/src/mention/src/Mention.tsx index 95644f82594..1dcf0abeafc 100644 --- a/src/mention/src/Mention.tsx +++ b/src/mention/src/Mention.tsx @@ -55,15 +55,15 @@ export const mentionProps = { (pattern: string, option: MentionOption) => boolean >, default: (pattern: string, option: MentionOption) => { - if (!pattern) - return true - if (typeof option.label === 'string') { - return option.label.startsWith(pattern) - } - if (typeof option.value === 'string') { - return option.value.startsWith(pattern) - } - return false + if (!pattern) return true; + const lowerCasePattern = pattern.toLowerCase(); + + // Match both label and value, if they are strings + const matchesLabel = typeof option.label === 'string' && option.label.toLowerCase().startsWith(lowerCasePattern); + const matchesValue = typeof option.value === 'string' && option.value.toLowerCase().startsWith(lowerCasePattern); + + // Return true if either matches + return matchesLabel || matchesValue; } }, type: {