Skip to content

Commit ede40a3

Browse files
committed
using templateRef to access ref
1 parent 1fa0e1b commit ede40a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Slider/MucSlider.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
import type { Options } from "@splidejs/splide";
4343
4444
import { Splide } from "@splidejs/vue-splide";
45-
import { computed, onMounted, ref } from "vue";
45+
import { computed, onMounted, ref, useTemplateRef } from "vue";
4646
4747
import { MucButton } from "../Button";
4848
@@ -61,7 +61,7 @@ const emit = defineEmits<{
6161
changeSlide: [index: number];
6262
}>();
6363
64-
const splide = ref();
64+
const splide = useTemplateRef("splide");
6565
6666
/**
6767
* Index of the current silde

0 commit comments

Comments
 (0)