mirror of
https://github.com/DavidHDev/vue-bits.git
synced 2026-03-09 00:19:31 -06:00
Added useTemplateRef API support
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue';
|
||||
import { computed, useTemplateRef } from 'vue';
|
||||
|
||||
interface GlareHoverProps {
|
||||
width?: string;
|
||||
@@ -33,7 +33,7 @@ const props = withDefaults(defineProps<GlareHoverProps>(), {
|
||||
style: () => ({})
|
||||
});
|
||||
|
||||
const overlayRef = ref<HTMLDivElement | null>(null);
|
||||
const overlayRef = useTemplateRef<HTMLDivElement>('overlayRef');
|
||||
|
||||
const rgba = computed(() => {
|
||||
const hex = props.glareColor.replace('#', '');
|
||||
|
||||
Reference in New Issue
Block a user