mirror of
https://github.com/usememos/memos.git
synced 2025-02-01 01:58:14 +08:00
fix: image width error while loading (#2394)
fix image width error while loading
This commit is contained in:
parent
213c2ea71b
commit
e30d0c2dd0
1 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@ const MemoResourceListView: React.FC<Props> = (props: Props) => {
|
||||||
(imageResourceList.length === 1 ? (
|
(imageResourceList.length === 1 ? (
|
||||||
<div className="mt-2 max-w-full max-h-72 flex justify-center items-center border dark:border-zinc-800 rounded overflow-hidden hide-scrollbar hover:shadow-md">
|
<div className="mt-2 max-w-full max-h-72 flex justify-center items-center border dark:border-zinc-800 rounded overflow-hidden hide-scrollbar hover:shadow-md">
|
||||||
<img
|
<img
|
||||||
className="cursor-pointer min-h-full w-auto min-w-full object-cover"
|
className="cursor-pointer min-h-full w-auto object-cover"
|
||||||
src={getResourceUrl(imageResourceList[0])}
|
src={getResourceUrl(imageResourceList[0])}
|
||||||
onClick={() => handleImageClick(getResourceUrl(imageResourceList[0]))}
|
onClick={() => handleImageClick(getResourceUrl(imageResourceList[0]))}
|
||||||
decoding="async"
|
decoding="async"
|
||||||
|
@ -65,7 +65,7 @@ const MemoResourceListView: React.FC<Props> = (props: Props) => {
|
||||||
className="flex justify-center items-center border dark:border-zinc-900 rounded overflow-hidden hide-scrollbar hover:shadow-md"
|
className="flex justify-center items-center border dark:border-zinc-900 rounded overflow-hidden hide-scrollbar hover:shadow-md"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
className="cursor-pointer min-h-full w-auto min-w-full object-cover"
|
className="cursor-pointer min-h-full w-auto object-cover"
|
||||||
src={resource.externalLink ? url : url + "?thumbnail=1"}
|
src={resource.externalLink ? url : url + "?thumbnail=1"}
|
||||||
onClick={() => handleImageClick(url)}
|
onClick={() => handleImageClick(url)}
|
||||||
decoding="async"
|
decoding="async"
|
||||||
|
|
Loading…
Reference in a new issue