mirror of
https://github.com/elk-zone/elk.git
synced 2024-12-12 12:58:27 +03:00
refactor: remove extra computed
This commit is contained in:
parent
705ce6ada4
commit
83a4ee75d0
1 changed files with 2 additions and 3 deletions
|
@ -8,7 +8,6 @@ const props = defineProps<{
|
|||
/** When it is root card in the list, not appear as a child card */
|
||||
root?: boolean
|
||||
}>()
|
||||
const cardImage = $computed(() => props.card.image)
|
||||
const alt = $computed(() => `${props.card.title} - ${props.card.title}`)
|
||||
const isSquare = $computed(() => props.smallPictureOnly || props.card.width === props.card.height)
|
||||
const providerName = $computed(() => props.card.providerName ? props.card.providerName : new URL(props.card.url).hostname)
|
||||
|
@ -35,7 +34,7 @@ const imageSrcset = $computed(() => props.card.image
|
|||
target="_blank"
|
||||
>
|
||||
<div
|
||||
v-if="cardImage"
|
||||
v-if="card.image"
|
||||
flex flex-col
|
||||
display-block of-hidden
|
||||
border="base"
|
||||
|
@ -47,7 +46,7 @@ const imageSrcset = $computed(() => props.card.image
|
|||
>
|
||||
<CommonBlurhash
|
||||
:blurhash="card.blurhash"
|
||||
:src="cardImage"
|
||||
:src="card.image"
|
||||
:srcset="imageSrcset"
|
||||
:width="card.width"
|
||||
:height="card.height"
|
||||
|
|
Loading…
Reference in a new issue