diff --git a/src/vue/index.ts b/src/vue/index.ts index 1471a01..8cd215d 100644 --- a/src/vue/index.ts +++ b/src/vue/index.ts @@ -36,8 +36,9 @@ export function useAutoAnimate( } onMounted(() => { watchEffect(() => { - if (element.value instanceof HTMLElement) - controller = autoAnimate(element.value, options || {}) + const el = element.value?.$el || element.value + if (el instanceof HTMLElement) + controller = autoAnimate(el, options || {}) }) })