JSPM

now-base-avatar

0.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q10508F
  • License MIT

NOW 基础组件 avatar

Package Exports

  • now-base-avatar

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (now-base-avatar) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

now-base-avatar 基础头像

特性,支持 lazyload, 具有一个默认头像,默认大小 50px, 50px, 图片为 svg ,自定义大小,不会失真 可传入 style 进行自定义样式修改, 可以透传事件

API

属性 说明 类型 默认值 是否必传
placeholder 默认图片地址 string -
src 封面的图片地址 string -
style CSS 内联 style object -
onClick(任意dom事件) dom 事件名, function -

安装

npm install now-base-avatar

传参示例

import Avatar from 'now-base-avatar'
<Avatar src="a.png">
    显示的文字
</Avatar>