From 06dca2fd715eb0f83adae93bc6c4701e47428cf8 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Mon, 24 Jul 2023 15:07:37 +0800 Subject: [PATCH] lazyimg title --- components/LazyImage.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/LazyImage.js b/components/LazyImage.js index 0fc0a7c4..4556bd0d 100644 --- a/components/LazyImage.js +++ b/components/LazyImage.js @@ -16,6 +16,7 @@ export default function LazyImage({ className, width, height, + title, onLoad, style }) { @@ -66,6 +67,10 @@ export default function LazyImage({ imgProps.id = id } + if (title) { + imgProps.title = title + } + if (width && width !== 'auto') { imgProps.width = width }