fix(style-vars): apply css vars in post flush effect

This commit is contained in:
Evan You 2020-11-16 15:40:16 -05:00
parent 713fcb18a9
commit 3a6b1207fa

View File

@ -30,7 +30,7 @@ export function useCssVars(
const setVars = () => const setVars = () =>
setVarsOnVNode(instance.subTree, getter(instance.proxy!), prefix) setVarsOnVNode(instance.subTree, getter(instance.proxy!), prefix)
onMounted(() => watchEffect(setVars)) onMounted(() => watchEffect(setVars, { flush: 'post' }))
onUpdated(setVars) onUpdated(setVars)
} }