fix. 공통 컴포넌트 수정

This commit is contained in:
clkim
2025-11-06 15:27:36 +09:00
parent f839a7be41
commit a5fc9b631d
7 changed files with 20 additions and 12 deletions

View File

@@ -2,10 +2,12 @@
interface Props {
src: string | { pc?: string; mo?: string }
alt?: string
imageType?: 'common' | 'game'
}
const props = withDefaults(defineProps<Props>(), {
alt: 'image',
imageType: 'game',
})
const isDev = process.env.NODE_ENV === 'development'
@@ -16,13 +18,23 @@ const isResponsiveMode = computed(() => {
})
const imagePaths = computed(() => {
if (typeof props.src === 'string') {
const resolved = getImageHost(`${rootPath}${props.src}`)
const resolved = getImageHost(`${rootPath}${props.src}`, {
imageType: props.imageType,
})
return { pc: resolved, mo: '' }
}
return {
pc: props.src.pc ? getImageHost(`${rootPath}${props.src.pc}`) : '',
mo: props.src.mo ? getImageHost(`${rootPath}${props.src.mo}`) : '',
pc: props.src.pc
? getImageHost(`${rootPath}${props.src.pc}`, {
imageType: props.imageType,
})
: '',
mo: props.src.mo
? getImageHost(`${rootPath}${props.src.mo}`, {
imageType: props.imageType,
})
: '',
}
})
</script>

View File

@@ -16,10 +16,10 @@ withDefaults(defineProps<Props>(), {
:width="size"
:height="size"
viewBox="0 0 12 12"
:fill="color"
>
<path
d="M5.29499 7.715L2.39999 4.875C2.07499 4.555 2.29999 4 2.75999 4L9.23499 4C9.69499 4 9.91999 4.555 9.59499 4.875L6.69999 7.715C6.30999 8.095 5.68999 8.095 5.29999 7.715H5.29499Z"
:fill="color"
/>
</svg>
</template>

View File

@@ -16,12 +16,12 @@ withDefaults(defineProps<Props>(), {
:width="size"
:height="size"
viewBox="0 0 20 20"
:fill="color"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M6.91073 3.57757C6.5853 3.90301 6.5853 4.43065 6.91073 4.75609L12.1548 10.0002L6.91073 15.2442C6.5853 15.5697 6.5853 16.0973 6.91073 16.4228C7.23617 16.7482 7.76381 16.7482 8.08924 16.4228L13.9226 10.5894C14.248 10.264 14.248 9.73634 13.9226 9.41091L8.08924 3.57757C7.76381 3.25214 7.23617 3.25214 6.91073 3.57757Z"
:fill="color"
/>
</svg>
</template>

View File

@@ -51,7 +51,7 @@ onUnmounted(() => {
<Transition name="fade">
<div
v-if="isOpen"
class="fixed inset-0 flex items-center justify-center bg-black bg-opacity-75 z-[800]"
class="modal-wrap dimmed overflow-hidden flex items-center justify-center"
:class="props.modalName"
@click="handleOutsideClick"
>

View File

@@ -27,7 +27,6 @@ export const useCheckPCSpec = (tm: (key: string) => string) => {
contentText: tm('Download_Alert_InstallGuide'),
confirmButtonText: tm('Download_Text_Download'),
modalName: 'modal-download',
isShowDimmed: true,
confirmButtonEvent: () => {
location.href = String(setupUrl)
},

View File

@@ -27,7 +27,6 @@ export const useTokenValidation = () => {
modalStore.handleOpenConfirm({
contentText: tm(alertKey),
confirmButtonText: tm('Text_StoveLogin'),
modalName: 'modal-login',
confirmButtonEvent: () => {
csrGoStoveLogin()
},

View File

@@ -27,13 +27,11 @@ export const getImageHost = (
const { staticUrl, assetsUrl } = config.public
const { imageType = 'game' } = options
const isDevelopment = process.env.NODE_ENV === 'development'
const isDevelopment = import.meta.dev
const isTypeGame = imageType === 'game'
// * [TODO] 수정 필요 : 게임별 이미지 로컬에 추가 필요.
if (isTypeGame) {
return `${staticUrl}${path}`
}
if (isTypeGame) return `${staticUrl}${path}`
// 개발 환경일 때는 루트 경로 생략
if (isDevelopment) return path