fix. page api 수정된 구조에 맞춰 코드 수정
This commit is contained in:
@@ -1,35 +1,27 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
getResourcesData,
|
||||
getResponsiveClass,
|
||||
getResponsiveSrc,
|
||||
} from '#layers/utils/dataUtil'
|
||||
import type { PageDataComponent } from '#layers/types/api/pageData'
|
||||
import { getResponsiveClass, getResponsiveSrc } from '#layers/utils/dataUtil'
|
||||
import type { PageDataResourceGroup } from '#layers/types/api/pageData'
|
||||
|
||||
const props = defineProps<{
|
||||
componentData: PageDataComponent
|
||||
resourcesData: PageDataResourceGroup
|
||||
gradientClass?: string
|
||||
groupSets?: boolean
|
||||
}>()
|
||||
|
||||
const resourcesData = computed(() => {
|
||||
return getResourcesData({
|
||||
resources: props.componentData?.resources,
|
||||
groupSets: props.groupSets,
|
||||
})
|
||||
const resPath = computed(() => {
|
||||
return props.resourcesData?.res_path
|
||||
})
|
||||
const bgStyles = computed(() => {
|
||||
return getResponsiveSrc(resourcesData.value?.res_path, {
|
||||
return getResponsiveSrc(resPath.value, {
|
||||
resourcesType: 'bg',
|
||||
})
|
||||
})
|
||||
const videoSrc = computed(() => {
|
||||
return getResponsiveSrc(resourcesData.value?.res_path, {
|
||||
return getResponsiveSrc(resPath.value, {
|
||||
resourcesType: 'video',
|
||||
})
|
||||
})
|
||||
const posterSrc = computed(() => {
|
||||
return getResponsiveSrc(resourcesData.value?.res_path)
|
||||
return getResponsiveSrc(resPath.value)
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user