1
0

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(', '))