fix. CardNews 하이드레이션 수정
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
interface Props {
|
||||
title: string
|
||||
description: string | number
|
||||
imgPath: string
|
||||
imgPath: string | null
|
||||
linkTarget?: '_blank' | '_self'
|
||||
url?: string
|
||||
alt?: string
|
||||
@@ -13,6 +13,9 @@ const props = defineProps<Props>()
|
||||
const { locale } = useI18n()
|
||||
const { sendLog, useAnalyticsLogDataDirect } = useAnalytics()
|
||||
|
||||
const isNoImage = computed(() => {
|
||||
return !props.imgPath || props.imgPath === null
|
||||
})
|
||||
const isShowOverlay = computed(() => {
|
||||
return props.title || props.description
|
||||
})
|
||||
@@ -30,7 +33,7 @@ const handleLinkClick = (title: string) => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div :class="['card-news', { 'no-image': !props.imgPath }, props.class]">
|
||||
<div :class="['card-news', { 'no-image': isNoImage }, props.class]">
|
||||
<img
|
||||
v-if="props.imgPath"
|
||||
:src="props.imgPath"
|
||||
|
||||
Reference in New Issue
Block a user