Skip to content

Commit 07f382e

Browse files
committed
fix: image的style覆盖className
1 parent 214540b commit 07f382e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/packages/image/image.taro.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,12 @@ export const Image: FunctionComponent<Partial<TaroImageProps>> = (props) => {
5656
const containerStyle = {
5757
...(height ? { height: pxCheck(height) } : {}),
5858
...(width ? { width: pxCheck(width) } : {}),
59-
overflow: radius !== undefined && radius !== null ? 'hidden' : '',
60-
borderRadius: radius !== undefined && radius != null ? pxCheck(radius) : '',
59+
...(radius !== undefined && radius !== null
60+
? {
61+
overflow: 'hidden',
62+
borderRadius: pxCheck(radius),
63+
}
64+
: {}),
6165
}
6266

6367
const imgStyle: any = {

0 commit comments

Comments
 (0)