fix. 컴포넌트 dataUtil 통일

This commit is contained in:
clkim
2025-10-21 12:18:06 +09:00
parent e86920b496
commit fdf1d9175c
18 changed files with 159 additions and 184 deletions

View File

@@ -10,28 +10,25 @@ interface Props {
}
const props = defineProps<Props>()
const {locale} = useI18n()
const { locale } = useI18n()
const { sendLog, useAnalyticsLogDataDirect } = useAnalytics()
const handleLinkClick = (title) => {
const handleLinkClick = (title: string) => {
const trackingData = {
tracking: {
click_item: title,
action_type: 'click',
click_sarea: ''
}
click_sarea: '',
},
}
sendLog(locale.value, useAnalyticsLogDataDirect(trackingData, 1))
}
</script>
<template>
<div
v-if="props.title || props.description"
:class="`card-news ${props.class || ''}`"
@click="handleLinkClick(props.title)"
>
<img
:src="props.imgPath"
@@ -52,6 +49,7 @@ const handleLinkClick = (title) => {
:href="props.url"
:target="props.linkTarget"
class="card-link"
@click="handleLinkClick(props.title)"
/>
</div>
</template>

View File

@@ -34,7 +34,7 @@ const options = computed((): ResponsiveOptions => {
focus: 'center',
autoWidth: true,
autoHeight: true,
speed: 400,
speed: 500,
updateOnMove: true,
arrows: props.arrows && isMultipleItems.value,
pagination: props.pagination && isMultipleItems.value,
@@ -86,7 +86,7 @@ const style = computed(() => {
const handleSplideMounted = (splide: SplideType) => {
emit('mounted', splide)
splide.refresh()
// 화살표 버튼 클릭 이벤트 리스너 추가
nextTick(() => {
addArrowClickListeners(splide, (direction, targetIndex) => {
@@ -103,18 +103,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>
@@ -123,7 +111,6 @@ const handleMoved = (
:options="options"
@splide:mounted="handleSplideMounted"
@splide:move="handleMove"
@splide:moved="handleMoved"
>
<slot />
</Splide>

View File

@@ -33,7 +33,7 @@ const options = computed((): ResponsiveOptions => {
focus: 'center',
autoWidth: true,
autoHeight: true,
speed: 400,
speed: 500,
updateOnMove: true,
arrows: props.arrows && isMultipleItems.value,
pagination: props.pagination && isMultipleItems.value,
@@ -88,7 +88,7 @@ const style = computed(() => {
const handleSplideMounted = (splide: SplideType) => {
emit('mounted', splide)
splide.refresh()
// 화살표 버튼 클릭 이벤트 리스너 추가
nextTick(() => {
addArrowClickListeners(splide, (direction, targetIndex) => {

View File

@@ -28,7 +28,7 @@ const options = computed((): ResponsiveOptions => {
rewind: true,
perPage: 1,
perMove: 1,
speed: 600,
speed: 500,
updateOnMove: true,
autoplay: props.autoplay,
pauseOnHover: false,

View File

@@ -42,7 +42,7 @@ const mainOptions = computed<Options>(() => ({
rewind: true,
perPage: 1,
perMove: 1,
speed: 600,
speed: 500,
arrows: false,
pagination: false,
drag: props.drag,