diff --git a/packages/runtime-dom/src/helpers/useCssVars.ts b/packages/runtime-dom/src/helpers/useCssVars.ts index ff90ec8ce..1f5ac7fae 100644 --- a/packages/runtime-dom/src/helpers/useCssVars.ts +++ b/packages/runtime-dom/src/helpers/useCssVars.ts @@ -30,7 +30,7 @@ export function useCssVars( const setVars = () => setVarsOnVNode(instance.subTree, getter(instance.proxy!), prefix) - onMounted(() => watchEffect(setVars)) + onMounted(() => watchEffect(setVars, { flush: 'post' })) onUpdated(setVars) }