Merge branch 'feature/20251001-gil' into feature/20250910-all

This commit is contained in:
clkim
2025-10-21 09:45:48 +09:00
9 changed files with 144 additions and 63 deletions

View File

@@ -5,6 +5,7 @@ import type {
PageDataTemplateComponentSet,
PageDataResourceGroups,
} from '#layers/types/api/pageData'
import { useSplideArrow } from '#layers/composables/useSplideArrow'
interface Props {
slideData: PageDataTemplateComponentSet[]
@@ -18,6 +19,11 @@ const props = withDefaults(defineProps<Props>(), {
drag: true,
})
const emit = defineEmits(['arrowClick'])
// Splide 화살표 로직을 위한 composable 사용
const { addArrowClickListeners } = useSplideArrow()
let mainInst: SplideType | null = null
let thumbsInst: SplideType | null = null
@@ -85,6 +91,13 @@ onMounted(() => {
if (mainInst && thumbsInst) {
mainInst.sync(thumbsInst)
// 썸네일 슬라이드의 화살표 버튼에 이벤트 리스너 추가
nextTick(() => {
addArrowClickListeners(thumbsInst, (direction, targetIndex) => {
emit('arrowClick', direction, targetIndex)
})
})
}
})