mirror of
https://github.com/elk-zone/elk.git
synced 2024-12-13 14:49:47 +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 */
|
/** When it is root card in the list, not appear as a child card */
|
||||||
root?: boolean
|
root?: boolean
|
||||||
}>()
|
}>()
|
||||||
const cardImage = $computed(() => props.card.image)
|
|
||||||
const alt = $computed(() => `${props.card.title} - ${props.card.title}`)
|
const alt = $computed(() => `${props.card.title} - ${props.card.title}`)
|
||||||
const isSquare = $computed(() => props.smallPictureOnly || props.card.width === props.card.height)
|
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)
|
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"
|
target="_blank"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-if="cardImage"
|
v-if="card.image"
|
||||||
flex flex-col
|
flex flex-col
|
||||||
display-block of-hidden
|
display-block of-hidden
|
||||||
border="base"
|
border="base"
|
||||||
|
@ -47,7 +46,7 @@ const imageSrcset = $computed(() => props.card.image
|
||||||
>
|
>
|
||||||
<CommonBlurhash
|
<CommonBlurhash
|
||||||
:blurhash="card.blurhash"
|
:blurhash="card.blurhash"
|
||||||
:src="cardImage"
|
:src="card.image"
|
||||||
:srcset="imageSrcset"
|
:srcset="imageSrcset"
|
||||||
:width="card.width"
|
:width="card.width"
|
||||||
:height="card.height"
|
:height="card.height"
|
||||||
|
|
Loading…
Reference in a new issue