import styles from '@/components/Avatar/index.module.scss'
import { useState, useImperativeHandle, forwardRef } from "react";
const Avatar = forwardRef((props: any, ref: any) => {
  useImperativeHandle(ref, () => ({
    getData: () => {

    }
  }))
  return (
    <>
      <div className={styles.avatar} style={{ fontSize: props.name ? '14px' : '6px' }}>
        {props.name ? props.name.slice(-2) : '加载中...'}
      </div>
    </>
  )
})

export default Avatar