# Avatar

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0.

## Code scaffolding

Run `ng generate component component-name --project avatar` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project avatar`.
> Note: Don't forget to add `--project avatar` or else it will be added to the default project in your `angular.json` file. 

## Build

Run `ng build avatar` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build avatar`, go to the dist folder `cd dist/avatar` and run `npm publish`.

## Running unit tests

Run `ng test avatar` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

## 属性
1. cover 头像img标签默认路径
2. size 图片最大size 单位M
3. type 图片限制的类型 接收数组类型
4. readonly 是否只读 默认false
5. imgTitle 鼠标放上去后img位置的title值
6. avatarWidth 宽度 number 默认100
7. avatarHeight 高度 number 默认100
8. imgShape 头像形状 默认为圆形'circle' 可选参数 正方形'square'
    如果需要设置椭圆形，需要修改avatarWidth、avatarHeight，调整圆形显示即可

## 事件
1. imgChange 图片变化后监听事件