Skip to content

Commit

Permalink
fix(lint): fix code.
Browse files Browse the repository at this point in the history
  • Loading branch information
shangqunfeng committed Nov 5, 2024
1 parent 6a7bd25 commit d31f72d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
22 changes: 11 additions & 11 deletions packages/webpack-plugin/lib/runtime/components/react/mpx-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -366,17 +366,17 @@ const Image = forwardRef<HandlerRef<RNImage, ImageProps>, 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)
}
</View>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,9 @@ function wrapImage (imageStyle?: ExtendedViewStyle, innerStyle?: Record<string,
}
}

return <View key='backgroundImage' {...needLayout ? { onLayout } : null} style={{ ...inheritStyle(innerStyle), ...StyleSheet.absoluteFillObject, overflow: 'hidden' }}>
return <View key='backgroundImage' {...needLayout ? { onLayout } : null} style={{ ...inheritStyle(innerStyle), ...StyleSheet.absoluteFillObject, overflow: 'hidden' }}>
{show && type === 'linear' && <LinearGradient useAngle={true} {...imageStyleToProps(preImageInfo, sizeInfo.current as Size, layoutInfo.current as Size)} /> }
{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))}
</View>
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,4 +529,3 @@ export function renderImage (imageProps: Record<string, any>, enableFastImage =
const Component = enableFastImage ? FastImage : Image
return <Component {...imageProps} />
}

0 comments on commit d31f72d

Please sign in to comment.