fix. 컴포넌트 리팩토링
This commit is contained in:
@@ -5,6 +5,7 @@ interface Props {
|
||||
imgPath: string
|
||||
linkTarget?: string
|
||||
url?: string
|
||||
alt?: string
|
||||
class?: string
|
||||
}
|
||||
|
||||
@@ -18,7 +19,7 @@ const props = defineProps<Props>()
|
||||
>
|
||||
<img
|
||||
:src="props.imgPath"
|
||||
:alt="props.title"
|
||||
:alt="props.title || props.alt"
|
||||
class="card-image"
|
||||
loading="lazy"
|
||||
/>
|
||||
|
||||
@@ -15,8 +15,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
pagination: true,
|
||||
})
|
||||
|
||||
// 페이드 슬라이드 옵션
|
||||
const fadeOptions = computed((): ResponsiveOptions => {
|
||||
const options = computed((): ResponsiveOptions => {
|
||||
return {
|
||||
type: 'fade',
|
||||
rewind: true,
|
||||
@@ -40,7 +39,7 @@ const fadeOptions = computed((): ResponsiveOptions => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Splide :options="fadeOptions" class="h-full">
|
||||
<Splide :options="options" class="h-full">
|
||||
<slot />
|
||||
</Splide>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user