diff --git a/packages/runtime-dom/src/components/Transition.ts b/packages/runtime-dom/src/components/Transition.ts index 13fd0f3f533..1a4e2c82b11 100644 --- a/packages/runtime-dom/src/components/Transition.ts +++ b/packages/runtime-dom/src/components/Transition.ts @@ -200,12 +200,12 @@ export interface ElementWithTransition extends HTMLElement { } export function addTransitionClass(el: ElementWithTransition, cls: string) { - el.classList.add(cls) + cls.split(/\s+/).forEach(c => c && el.classList.add(c)) ;(el._vtc || (el._vtc = new Set())).add(cls) } export function removeTransitionClass(el: ElementWithTransition, cls: string) { - el.classList.remove(cls) + cls.split(/\s+/).forEach(c => c && el.classList.remove(c)) if (el._vtc) { el._vtc.delete(cls) if (!el._vtc!.size) {