From d1d6864d5816a931e9d9add4c125cc7e7edc61ff Mon Sep 17 00:00:00 2001 From: zhouzheng Date: Fri, 17 Feb 2023 10:37:35 +0800 Subject: [PATCH] =?UTF-8?q?refactor(Avatar):=20=E4=BD=BF=E7=94=A8=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E7=BB=84=E4=BB=B6=E9=87=8D=E6=9E=84=20Class=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=86=99=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/Avatar/index.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/core/src/Avatar/index.tsx b/packages/core/src/Avatar/index.tsx index 79e3b3496..54c7cb98c 100644 --- a/packages/core/src/Avatar/index.tsx +++ b/packages/core/src/Avatar/index.tsx @@ -37,7 +37,8 @@ export interface AvatarProps extends ViewProps { } export default function Avatar(props: AvatarProps) { - const { style, src = defaultImage, size = 40, shape = 'square', rounded = 3, imageProps, ...otherProps } = props; + const { style, src, size, shape, rounded, imageProps, ...otherProps } = props; + return ( ); } + +Avatar.defaultProps = { + src: defaultImage, + shape: 'square', + rounded: 3, + size: 40, +} as AvatarProps;