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

View File

@@ -33,9 +33,13 @@ const mainTitleData = computed(() =>
const descriptionData = computed(() =>
getComponentGroup(props.components, 'description')
)
const videoPlayData = computed(() =>
getComponentGroup(props.components, 'videoPlayImg')
)
const videoPlayData = computed(() => {
const imgData = getComponentGroup(props.components, 'videoPlayImg')
return {
resource: imgData ?? getComponentGroup(props.components, 'videoPlay'),
category: imgData ? ('image' as const) : ('system' as const),
}
})
const arrowsData = computed(() =>
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]"
/>
<WidgetsVideoPlay
v-if="videoPlayData"
category="image"
:resources-data="videoPlayData"
v-if="videoPlayData.resource"
:category="videoPlayData.category"
:resources-data="videoPlayData.resource"
/>
<WidgetsSlideCenterHighlight
v-if="slideData && slideData.length > 0"