mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 03:29:39 +08:00
use class property of this.state
This commit is contained in:
parent
adee2f3329
commit
c88784a61c
@ -37,15 +37,12 @@ export default class Avatar extends React.Component<AvatarProps, AvatarState> {
|
||||
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();
|
||||
|
Loading…
Reference in New Issue
Block a user