fix. [PWT-93] 이미지 타입형 컨텐츠 리스트 미노출 수정

This commit is contained in:
clkim
2025-12-01 14:34:54 +09:00
parent 9b3b7b4ee3
commit 4cfb85b045
6 changed files with 75 additions and 90 deletions

View File

@@ -1,6 +1,5 @@
import { useBreakpoints } from '@vueuse/core'
import { getDeviceSrc } from '#layers/utils/styleUtil'
import type { PageDataResourceGroupResPath } from '#layers/types/api/pageData'
import type { PageDataResourceGroup } from '#layers/types/api/pageData'
export const BREAKPOINTS = {
xs: 360,
@@ -36,15 +35,17 @@ export const useResponsiveSrc = () => {
const breakpoints = useResponsiveBreakpoints()
const getCurrentSrc = (
path: PageDataResourceGroupResPath,
resourcesData: PageDataResourceGroup,
options?: {
resourcesType?: 'image' | 'video'
imageType?: 'game' | 'common'
resourcesType?: 'IMG' | 'VID'
}
) => {
const result = getDeviceSrc(path, options)
const result = getResourceSrc(resourcesData, options?.resourcesType)
if (!result) return ''
return breakpoints.value.isMobile ? result.mobileSrc : result.pcSrc
return breakpoints.value.isMobile
? formatPathHost(result.mo, { imageType: options?.imageType })
: formatPathHost(result.pc, { imageType: options?.imageType })
}
return { getCurrentSrc }