diff --git a/components/avatar/index.tsx b/components/avatar/index.tsx index 9714aed2d7..aea07a336e 100644 --- a/components/avatar/index.tsx +++ b/components/avatar/index.tsx @@ -37,15 +37,12 @@ export default class Avatar extends React.Component { size: 'default', }; - private avatarChildren: any; + state = { + scale: 1, + isImgExist: true, + }; - constructor(props: AvatarProps) { - super(props); - this.state = { - scale: 1, - isImgExist: true, - }; - } + private avatarChildren: any; componentDidMount() { this.setScale();