fix. [PWT-93] 이미지 타입형 컨텐츠 리스트 미노출 수정
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user