Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@txdfe/at-users-avatar

Package Overview
Dependencies
Maintainers
7
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@txdfe/at-users-avatar

AT业务组件 - 多人头像

latest
npmnpm
Version
1.0.0
Version published
Maintainers
7
Created
Source

at-users-avatar

简介

多人头像显示,当人数超过四人时,显示前三个人的头像,后面人员的均以...显示,当鼠标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);

API

参数类型可选值默认值是否必填说明
dataSourceArray传入的数据源,可以动态的渲染子项
borderColorString#fff头像边框颜色

dataSource

	[
    {
      id: 'xxxxxx'; // 用户的ID
      nickname: '小小'; // 用户的花名
      name: '吴彦祖'; // 用户的姓名
      avatar_url: 'https://work.alibaba-inc.com/photo/xxxxxx.jpg'; // 用户的头像
    }
  ]

FAQs

Package last updated on 08 Jan 2020

Did you know?

Socket

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.

Install

Related posts