mirror of
https://github.com/DavidHDev/vue-bits.git
synced 2026-03-07 14:39:30 -07:00
Added useTemplateRef API support
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onBeforeUnmount, computed } from 'vue';
|
||||
import { ref, onMounted, onBeforeUnmount, computed, useTemplateRef } from 'vue';
|
||||
import { gsap } from 'gsap';
|
||||
|
||||
interface GridMotionProps {
|
||||
@@ -12,7 +12,7 @@ const props = withDefaults(defineProps<GridMotionProps>(), {
|
||||
gradientColor: '#222222'
|
||||
});
|
||||
|
||||
const gridRef = ref<HTMLElement | null>(null);
|
||||
const gridRef = useTemplateRef<HTMLElement>('gridRef');
|
||||
const rowRefs = ref<HTMLElement[]>([]);
|
||||
const mouseX = ref(window.innerWidth / 2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user