feat. 일반 템플릿 로그 추가
This commit is contained in:
@@ -11,39 +11,34 @@ import type { PageDataTemplateComponents } from '#layers/types/api/pageData'
|
||||
interface Props {
|
||||
components: PageDataTemplateComponents
|
||||
pageVerTmplSeq: number
|
||||
pageVerTmplNameEn: string
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
|
||||
const { locale } = useI18n()
|
||||
const { sendLog, useAnalyticsLogDataDirect } = useAnalytics()
|
||||
|
||||
const currentSlideIndex = ref<number | null>(null)
|
||||
|
||||
const slideData = computed(() => {
|
||||
return getComponentContainer(props.components, 'group_sets')
|
||||
})
|
||||
const arrowsData = computed(() => {
|
||||
return getComponentGroupAry(props.components, 'arrow')
|
||||
})
|
||||
const paginationData = computed(() => {
|
||||
return getComponentGroupAry(props.components, 'pagination')
|
||||
})
|
||||
|
||||
const onArrowClick = direction => {
|
||||
const arrowGroupAry = getComponentGroupAry(props.components, 'arrow')
|
||||
const logTracking = arrowGroupAry?.[direction === 'prev' ? 0 : 1]
|
||||
sendLog(locale.value, useAnalyticsLogDataDirect(logTracking, 1))
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="section-standard">
|
||||
<BlocksSlideFade
|
||||
<WidgetsSlideFade
|
||||
v-if="slideData"
|
||||
v-model:index="currentSlideIndex"
|
||||
:arrows="slideData.length > 1"
|
||||
:pagination="slideData.length > 1"
|
||||
class="h-full"
|
||||
:pagination-data="paginationData"
|
||||
@arrow-click="onArrowClick"
|
||||
:arrows-data="arrowsData"
|
||||
class="h-full"
|
||||
>
|
||||
<SplideSlide v-for="(item, index) in slideData" :key="index">
|
||||
<WidgetsBackground
|
||||
@@ -70,11 +65,10 @@ const onArrowClick = direction => {
|
||||
<WidgetsButtonList
|
||||
v-if="hasComponentGroup(item, 'buttonList')"
|
||||
:resources-data="getComponentGroupAry(item, 'buttonList')"
|
||||
:page-ver-tmpl-seq="props.pageVerTmplSeq"
|
||||
class="mt-[28px] md:mt-[52px]"
|
||||
/>
|
||||
</div>
|
||||
</SplideSlide>
|
||||
</BlocksSlideFade>
|
||||
</WidgetsSlideFade>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user