fix. utils 함수 리팩토링
This commit is contained in:
@@ -155,7 +155,7 @@ const handleMoveFocus = (target: 'pc' | 'mobile') => {
|
||||
>
|
||||
<img
|
||||
:src="
|
||||
getResourceHost('/images/common/img_desktop.png', {
|
||||
formatPathHost('/images/common/img_desktop.png', {
|
||||
imageType: 'common',
|
||||
})
|
||||
"
|
||||
@@ -410,7 +410,7 @@ const handleMoveFocus = (target: 'pc' | 'mobile') => {
|
||||
<div class="flex items-center justify-center w-full">
|
||||
<img
|
||||
:src="
|
||||
getResourceHost(
|
||||
formatPathHost(
|
||||
`/images/common/grades_driver/Type-${driver.driverCode}.svg`,
|
||||
{ imageType: 'common' }
|
||||
)
|
||||
|
||||
@@ -240,7 +240,7 @@ const handlePreregistClick = () => {
|
||||
<div class="flex flex-col gap-4 mt-8 md:flex-row">
|
||||
<div v-if="preImgPreregistdData" class="w-full max-w-[446px]">
|
||||
<AtomsImg
|
||||
:src="getImagePaths(preImgPreregistdData)"
|
||||
:src="getResourceSrc(preImgPreregistdData)"
|
||||
:alt="preImgPreregistdData?.display?.text"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
@@ -249,7 +249,7 @@ const handlePreregistClick = () => {
|
||||
</div>
|
||||
<div v-if="preImgSnsData" class="relative w-full max-w-[446px]">
|
||||
<AtomsImg
|
||||
:src="getImagePaths(preImgSnsData)"
|
||||
:src="getResourceSrc(preImgSnsData)"
|
||||
:alt="preImgSnsData?.display?.text"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
@@ -266,7 +266,7 @@ const handlePreregistClick = () => {
|
||||
>
|
||||
<a :href="btn.link" target="_blank" rel="noopener noreferrer">
|
||||
<AtomsImg
|
||||
:src="getImagePaths(btn.image)"
|
||||
:src="getResourceSrc(btn.image)"
|
||||
:alt="btn.image?.display?.text"
|
||||
/>
|
||||
</a>
|
||||
@@ -361,7 +361,7 @@ const handlePreregistClick = () => {
|
||||
>
|
||||
<AtomsImg
|
||||
:src="
|
||||
getImagePaths(
|
||||
getResourceSrc(
|
||||
item.flagType === 1 ? item.incomplete : item.default
|
||||
)
|
||||
"
|
||||
|
||||
@@ -232,7 +232,7 @@ onMounted(() => {
|
||||
>
|
||||
<img
|
||||
:src="
|
||||
getResourceHost(card.benefitIcon, { imageType: 'common' })
|
||||
formatPathHost(card.benefitIcon, { imageType: 'common' })
|
||||
"
|
||||
:alt="card.benefitTitle"
|
||||
class="w-[48px] h-[48px] object-contain rounded-2xl"
|
||||
|
||||
@@ -46,8 +46,8 @@ const buttonListData = computed(() => {
|
||||
<div v-if="imgListData" class="img-container">
|
||||
<div v-for="(item, index) in imgListData" :key="index" class="img-item">
|
||||
<AtomsImg
|
||||
v-if="getImagePaths(item)"
|
||||
:src="getImagePaths(item)"
|
||||
v-if="getResourceSrc(item)"
|
||||
:src="getResourceSrc(item)"
|
||||
:alt="item?.display?.text"
|
||||
class="w-full object-contain"
|
||||
/>
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
getComponentGroup,
|
||||
getComponentContainer,
|
||||
} from '#layers/utils/dataUtil'
|
||||
import { getResourceHost } from '#layers/utils/styleUtil'
|
||||
|
||||
import type { PageDataTemplateComponents } from '#layers/types/api/pageData'
|
||||
import type { OperateGroupItem } from '#layers/types/api/operateResources'
|
||||
|
||||
@@ -118,7 +118,7 @@ const onArrowClick = direction => {
|
||||
<BlocksCardNews
|
||||
:title="item.title"
|
||||
:description="globalDateFormat(item.reg_dt, locale)"
|
||||
:img-path="getResourceHost(item.img_path)"
|
||||
:img-path="formatPathHost(item.img_path)"
|
||||
:url="item.url"
|
||||
:link-target="item.link_target"
|
||||
class="slide-inner"
|
||||
|
||||
Reference in New Issue
Block a user