1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-12 20:09:59 +00:00

fix(ui): use correct url for timeline image srcset (#296)

This commit is contained in:
Alex 2022-12-03 00:48:44 +08:00 committed by GitHub
parent d17994338d
commit 2a84bbb3d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,7 @@ const { attachment } = defineProps<{
const src = $computed(() => attachment.previewUrl || attachment.url || attachment.remoteUrl!)
const srcset = $computed(() => [
[src, attachment.meta?.original?.width],
[attachment.url, attachment.meta?.original?.width],
[attachment.previewUrl, attachment.meta?.small?.width],
].filter(([url]) => url).map(([url, size]) => `${url} ${size}w`).join(', '))