From d31f72d9a8b8a795edd787764a2c157a64c267a7 Mon Sep 17 00:00:00 2001 From: shangqunfeng Date: Tue, 5 Nov 2024 14:23:02 +0800 Subject: [PATCH] fix(lint): fix code. --- .../runtime/components/react/mpx-image.tsx | 22 +++++++++---------- .../lib/runtime/components/react/mpx-view.tsx | 4 ++-- .../lib/runtime/components/react/utils.tsx | 1 - 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/packages/webpack-plugin/lib/runtime/components/react/mpx-image.tsx b/packages/webpack-plugin/lib/runtime/components/react/mpx-image.tsx index 3dfc99ca7..e3112fff0 100644 --- a/packages/webpack-plugin/lib/runtime/components/react/mpx-image.tsx +++ b/packages/webpack-plugin/lib/runtime/components/react/mpx-image.tsx @@ -366,17 +366,17 @@ const Image = forwardRef, ImageProps>((props, re }} /> : renderImage({ - source: { uri: src }, - resizeMode: resizeMode, - onLoad: bindload && onImageLoad, - onError: binderror && onImageError, - style: { - transformOrigin: 'top left', - width: isCropMode ? imageWidth : '100%', - height: isCropMode ? imageHeight : '100%', - ...(isCropMode && modeStyle) - } - }, enableFastImage) + source: { uri: src }, + resizeMode: resizeMode, + onLoad: bindload && onImageLoad, + onError: binderror && onImageError, + style: { + transformOrigin: 'top left', + width: isCropMode ? imageWidth : '100%', + height: isCropMode ? imageHeight : '100%', + ...(isCropMode && modeStyle) + } + }, enableFastImage) } ) diff --git a/packages/webpack-plugin/lib/runtime/components/react/mpx-view.tsx b/packages/webpack-plugin/lib/runtime/components/react/mpx-view.tsx index 30aafc951..3f9965931 100644 --- a/packages/webpack-plugin/lib/runtime/components/react/mpx-view.tsx +++ b/packages/webpack-plugin/lib/runtime/components/react/mpx-view.tsx @@ -611,9 +611,9 @@ function wrapImage (imageStyle?: ExtendedViewStyle, innerStyle?: Record + return {show && type === 'linear' && } - {show && type === 'image' && (renderImage(imageStyleToProps(preImageInfo, sizeInfo.current as Size, layoutInfo.current as Size), enableFastImage) )} + {show && type === 'image' && (renderImage(imageStyleToProps(preImageInfo, sizeInfo.current as Size, layoutInfo.current as Size), enableFastImage))} } diff --git a/packages/webpack-plugin/lib/runtime/components/react/utils.tsx b/packages/webpack-plugin/lib/runtime/components/react/utils.tsx index dc0740a31..9b5b79934 100644 --- a/packages/webpack-plugin/lib/runtime/components/react/utils.tsx +++ b/packages/webpack-plugin/lib/runtime/components/react/utils.tsx @@ -529,4 +529,3 @@ export function renderImage (imageProps: Record, enableFastImage = const Component = enableFastImage ? FastImage : Image return } -