fix. 코드 리팩토링

This commit is contained in:
clkim
2025-10-21 13:58:18 +09:00
parent fdf1d9175c
commit a702a0898f
6 changed files with 34 additions and 45 deletions

View File

@@ -18,7 +18,7 @@ const props = withDefaults(defineProps<Props>(), {
pagination: true,
})
const emit = defineEmits(['mounted', 'move', 'moved', 'arrowClick'])
const emit = defineEmits(['mounted', 'move', 'arrowClick'])
// Splide 화살표 로직을 위한 composable 사용
const { addArrowClickListeners } = useSplideArrow()
@@ -105,15 +105,6 @@ const handleMove = (
) => {
emit('move', splide, newIndex, oldIndex, destIndex)
}
const handleMoved = (
splide: SplideType,
newIndex: number,
oldIndex: number,
destIndex: number
) => {
emit('moved', splide, newIndex, oldIndex, destIndex)
}
</script>
<template>
@@ -122,7 +113,6 @@ const handleMoved = (
:options="options"
@splide:mounted="handleSplideMounted"
@splide:move="handleMove"
@splide:moved="handleMoved"
>
<slot />
</Splide>