We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5aa9868 commit 98d50d8Copy full SHA for 98d50d8
packages/runtime-dom/src/components/Transition.ts
@@ -200,12 +200,12 @@ export interface ElementWithTransition extends HTMLElement {
200
}
201
202
export function addTransitionClass(el: ElementWithTransition, cls: string) {
203
- el.classList.add(cls)
+ cls.split(/\s+/).forEach(c => c && el.classList.add(c))
204
;(el._vtc || (el._vtc = new Set())).add(cls)
205
206
207
export function removeTransitionClass(el: ElementWithTransition, cls: string) {
208
- el.classList.remove(cls)
+ cls.split(/\s+/).forEach(c => c && el.classList.remove(c))
209
if (el._vtc) {
210
el._vtc.delete(cls)
211
if (!el._vtc!.size) {
0 commit comments