From e86920b496b270e2a40932c2c6dba5986ef81893 Mon Sep 17 00:00:00 2001 From: clkim Date: Tue, 21 Oct 2025 09:49:02 +0900 Subject: [PATCH] =?UTF-8?q?fix.=20arrow=20=EB=A1=9C=EA=B7=B8=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layers/templates/GrGallery01/index.vue | 8 +++----- layers/templates/GrGallery02/index.vue | 8 +++----- layers/templates/GrGallery03/index.vue | 7 ++++--- layers/templates/GrVisual02/index.vue | 7 ++++--- layers/templates/GrVisual03/index.vue | 8 +++----- 5 files changed, 17 insertions(+), 21 deletions(-) diff --git a/layers/templates/GrGallery01/index.vue b/layers/templates/GrGallery01/index.vue index 18b28c3..c75f2bb 100644 --- a/layers/templates/GrGallery01/index.vue +++ b/layers/templates/GrGallery01/index.vue @@ -65,11 +65,9 @@ const stopVideo = () => { } const onArrowClick = (direction, targetIndex) => { - const logTraking = - direction == 'prev' - ? getComponentGroupAry(props.components, 'arrow')?.groups[0] - : getComponentGroupAry(props.components, 'arrow')?.groups[1] - sendLog(locale.value, useAnalyticsLogDataDirect(logTraking, 1)) + const arrowGroupAry = getComponentGroupAry(props.components, 'arrow') + const logTracking = arrowGroupAry?.[direction === 'prev' ? 0 : 1] + sendLog(locale.value, useAnalyticsLogDataDirect(logTracking, 1)) } onMounted(() => { diff --git a/layers/templates/GrGallery02/index.vue b/layers/templates/GrGallery02/index.vue index 7edce16..73b7715 100644 --- a/layers/templates/GrGallery02/index.vue +++ b/layers/templates/GrGallery02/index.vue @@ -57,11 +57,9 @@ const handleChange = ( const { locale } = useI18n() const { sendLog, useAnalyticsLogDataDirect } = useAnalytics() const onArrowClick = (direction, targetIndex) => { - const logTraking = - direction == 'prev' - ? getComponentGroupAry(props.components, 'arrow')?.groups[0] - : getComponentGroupAry(props.components, 'arrow')?.groups[1] - sendLog(locale.value, useAnalyticsLogDataDirect(logTraking, 1)) + const arrowGroupAry = getComponentGroupAry(props.components, 'arrow') + const logTracking = arrowGroupAry?.[direction === 'prev' ? 0 : 1] + sendLog(locale.value, useAnalyticsLogDataDirect(logTracking, 1)) } diff --git a/layers/templates/GrGallery03/index.vue b/layers/templates/GrGallery03/index.vue index 5f77fae..115d773 100644 --- a/layers/templates/GrGallery03/index.vue +++ b/layers/templates/GrGallery03/index.vue @@ -60,11 +60,12 @@ const handleChange = ( 'buttonList' ) } -const {locale} = useI18n() +const { locale } = useI18n() const { sendLog, useAnalyticsLogDataDirect } = useAnalytics() const onArrowClick = (direction, targetIndex) => { - const logTraking = direction == 'prev' ? props.components.arrow.groups[0] : props.components.arrow.groups[1]; - sendLog(locale.value, useAnalyticsLogDataDirect(logTraking, 1)) + const arrowGroupAry = getComponentGroupAry(props.components, 'arrow') + const logTracking = arrowGroupAry?.[direction === 'prev' ? 0 : 1] + sendLog(locale.value, useAnalyticsLogDataDirect(logTracking, 1)) } diff --git a/layers/templates/GrVisual02/index.vue b/layers/templates/GrVisual02/index.vue index e4a4595..938d894 100644 --- a/layers/templates/GrVisual02/index.vue +++ b/layers/templates/GrVisual02/index.vue @@ -71,11 +71,12 @@ const slideItemSize = { gap: 32, }, } -const {locale} = useI18n() +const { locale } = useI18n() const { sendLog, useAnalyticsLogDataDirect } = useAnalytics() const onArrowClick = (direction, targetIndex) => { - const logTraking = direction == 'prev' ? props.components.arrow.groups[0] : props.components.arrow.groups[1]; - sendLog(locale.value, useAnalyticsLogDataDirect(logTraking, 1)) + const arrowGroupAry = getComponentGroupAry(props.components, 'arrow') + const logTracking = arrowGroupAry?.[direction === 'prev' ? 0 : 1] + sendLog(locale.value, useAnalyticsLogDataDirect(logTracking, 1)) } console.log('resourcesData.value===', resourcesData.value) diff --git a/layers/templates/GrVisual03/index.vue b/layers/templates/GrVisual03/index.vue index 60711db..f36c959 100644 --- a/layers/templates/GrVisual03/index.vue +++ b/layers/templates/GrVisual03/index.vue @@ -24,11 +24,9 @@ const slideData = computed(() => { }) const onArrowClick = direction => { - const logTraking = - direction == 'prev' - ? getComponentGroupAry(props.components, 'arrow')?.groups[0] - : getComponentGroupAry(props.components, 'arrow')?.groups[1] - sendLog(locale.value, useAnalyticsLogDataDirect(logTraking, 1)) + const arrowGroupAry = getComponentGroupAry(props.components, 'arrow') + const logTracking = arrowGroupAry?.[direction === 'prev' ? 0 : 1] + sendLog(locale.value, useAnalyticsLogDataDirect(logTracking, 1)) }