fix. videoPlay 컴포넌트 시스템, 이미지 지원 가능하도록 수정

This commit is contained in:
clkim
2026-03-06 10:29:22 +09:00
parent 505e7b0f3c
commit be59ca2823
2 changed files with 20 additions and 12 deletions

View File

@@ -19,9 +19,13 @@ const mainTitleData = computed(() =>
const descriptionData = computed(() => const descriptionData = computed(() =>
getComponentGroup(props.components, 'description') getComponentGroup(props.components, 'description')
) )
const videoPlayData = computed(() => const videoPlayData = computed(() => {
getComponentGroup(props.components, 'videoPlayImg') const imgData = getComponentGroup(props.components, 'videoPlayImg')
) return {
resource: imgData ?? getComponentGroup(props.components, 'videoPlay'),
category: imgData ? ('image' as const) : ('system' as const),
}
})
const buttonListData = computed(() => const buttonListData = computed(() =>
getComponentGroupAry(props.components, 'buttonList') getComponentGroupAry(props.components, 'buttonList')
) )
@@ -46,9 +50,9 @@ const buttonListData = computed(() =>
class="w-full max-w-[355px] md:max-w-[944px]" class="w-full max-w-[355px] md:max-w-[944px]"
/> />
<WidgetsVideoPlay <WidgetsVideoPlay
v-if="videoPlayData" v-if="videoPlayData.resource"
category="image" :category="videoPlayData.category"
:resources-data="videoPlayData" :resources-data="videoPlayData.resource"
/> />
<WidgetsButtonList <WidgetsButtonList
v-if="buttonListData" v-if="buttonListData"

View File

@@ -33,9 +33,13 @@ const mainTitleData = computed(() =>
const descriptionData = computed(() => const descriptionData = computed(() =>
getComponentGroup(props.components, 'description') getComponentGroup(props.components, 'description')
) )
const videoPlayData = computed(() => const videoPlayData = computed(() => {
getComponentGroup(props.components, 'videoPlayImg') const imgData = getComponentGroup(props.components, 'videoPlayImg')
) return {
resource: imgData ?? getComponentGroup(props.components, 'videoPlay'),
category: imgData ? ('image' as const) : ('system' as const),
}
})
const arrowsData = computed(() => const arrowsData = computed(() =>
getComponentGroupAry(props.components, 'arrow') getComponentGroupAry(props.components, 'arrow')
) )
@@ -100,9 +104,9 @@ const slideItemSize = {
class="w-full max-w-[355px] mx-[20px] sm:mx-[40px] md:max-w-[944px]" class="w-full max-w-[355px] mx-[20px] sm:mx-[40px] md:max-w-[944px]"
/> />
<WidgetsVideoPlay <WidgetsVideoPlay
v-if="videoPlayData" v-if="videoPlayData.resource"
category="image" :category="videoPlayData.category"
:resources-data="videoPlayData" :resources-data="videoPlayData.resource"
/> />
<WidgetsSlideCenterHighlight <WidgetsSlideCenterHighlight
v-if="slideData && slideData.length > 0" v-if="slideData && slideData.length > 0"