
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@teamix/avatar
Advanced tools
如需给 Avatar 内部所用到的 @teamix/ui 组件指定 prefix,可添加 uiPrefix 参数(如 uiPrefix='aone-')
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
style | 设置组件样式 | Object | - |
className | 设置组件className | String | - |
size | 设置组件尺寸,可选值 'xs', 'small', 'medium', 'large', 'xl' | String | 'medium' |
img | 设置头像图片地址,必填 | String | - |
text | 设置头像旁文案,必填 | String | - |
closable | 是否显示关闭按钮 | Boolean | true |
onClose | 点击关闭回调 | Function | () => {} |
onClick | 点击头像回调 | Function | () => {} |
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
style | 设置组件样式 | Object | - |
className | 设置组件className | String | - |
size | 设置组件尺寸,可选值 'xs', 'small', 'medium', 'large', 'xl' | String | 'medium' |
text | 设置头像文案,必填 | String | - |
colorSets | 头像背景色集,会根据text的charCode选取其中一个作为背景色 | String数组 | ['#D3B0E7', '#B0B2E7', '#88ACDE', '#91D0E3', '#82D4BE', '#AFD492'] |
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
style | 设置组件样式 | Object | - |
className | 设置组件className | String | - |
size | 设置组件尺寸,可选值 'xs', 'small', 'medium', 'large', 'xl' | String | 'medium' |
img | 设置头像图片地址,必填 | String | - |
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
style | 设置组件样式 | Object | - |
className | 设置组件className | String | - |
dataSource | 头像群数据源,数组成员见下方,必填 | Array | - |
colorSets | 头像背景色集,img不存在时会根据text的charCode选取其中一个作为背景色 | String数组 | ['#D3B0E7', '#B0B2E7', '#88ACDE', '#91D0E3', '#82D4BE', '#AFD492'] |
onSelect | 点击单个头像回调,入参为该头像相关参数 | Function | (data) => {} |
onClose | 关闭单个头像回调,入参为该头像相关参数 | Function | (data) => {} |
onAdd | 点击添加回调 | Function | () => {} |
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
style | 设置组件样式 | Object | - |
className | 设置组件className | String | - |
colorSets | 头像背景色集,img不存在时会根据text的charCode选取其中一个作为背景色 | String数组 | ['#D3B0E7', '#B0B2E7', '#88ACDE', '#91D0E3', '#82D4BE', '#AFD492'] |
dataSource | 头像群数据源,数组成员见下方,必填 | Array | - |
onClickMore | 点击更多回调 | Function | () => {} |
showMore | hover到...是否显示更多用户 | Boolean | false |
align | 用户名字展示位置 | Enum | 'b', (参考:https://teamix.space-x.alibaba-inc.com/ui/balloon?theme=yunxiao) |
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
img | 头像图片地址 | String | - |
text | 头像对应文案,必填 | String | - |
id | 头像对应id,必填 | String or Number | - |
FAQs
Avatar Component
The npm package @teamix/avatar receives a total of 18 weekly downloads. As such, @teamix/avatar popularity was classified as not popular.
We found that @teamix/avatar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 21 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.