
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
@txdfe/at-users-avatar
Advanced tools
多人头像显示,当人数超过四人时,显示前三个人的头像,后面人员的均以...显示,当鼠标hover的时候显示所有人员信息。
import UsersAvatar from '@txdfe/at-users-avatar';
class Demo extends React.Component {
render() {
const dataSource = [
{
id: 'xxxxxx', // 用户的ID
nickname: '小小', // 用户的花名
name: '吴彦祖', // 用户的姓名
avatar_url: 'https://work.alibaba-inc.com/photo/xxxxxx.jpg', // 用户的头像
}
];
return (
<UsersAvatar dataSource={dataSource} />
);
}
}
ReactDOM.render(<Demo />, mountNode);
参数 | 类型 | 可选值 | 默认值 | 是否必填 | 说明 |
---|---|---|---|---|---|
dataSource | Array | 无 | 无 | 是 | 传入的数据源,可以动态的渲染子项 |
borderColor | String | 无 | #fff | 否 | 头像边框颜色 |
[
{
id: 'xxxxxx'; // 用户的ID
nickname: '小小'; // 用户的花名
name: '吴彦祖'; // 用户的姓名
avatar_url: 'https://work.alibaba-inc.com/photo/xxxxxx.jpg'; // 用户的头像
}
]
FAQs
AT业务组件 - 多人头像
We found that @txdfe/at-users-avatar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.