0.0.19 • Published 2 years ago
@farris/ui-avatar v0.0.19
Avatar
This library was generated with 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 avataror else it will be added to the default project in yourangular.jsonfile.
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.
Further help
To get more help on the Angular CLI use ng help or go check out the Angular CLI README.
属性
- cover 头像img标签默认路径
- size 图片最大size 单位M
- type 图片限制的类型 接收数组类型
- readonly 是否只读 默认false
- imgTitle 鼠标放上去后img位置的title值
- avatarWidth 宽度 number 默认100
- avatarHeight 高度 number 默认100
- imgShape 头像形状 默认为圆形'circle' 可选参数 正方形'square' 如果需要设置椭圆形,需要修改avatarWidth、avatarHeight,调整圆形显示即可
事件
- imgChange 图片变化后监听事件