edu-react-my-class-group-selector
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

edu-react-my-class-group-selector

钉钉教育「选班级群」React 组件

安装

yarn add edu-react-my-class-group-selector

API

import {
  MyClassGroupSelectorOfDesktop,
  MyClassGroupSelectorOfMobile,

  // 类型
  IMyClassGroupSelectorProps
  IClassGroup,
} from 'edu-react-my-class-group-selector';


// desktop 和 mobile API 一致
ReactDOM.render(
  <MyClassGroupSelectorOfDesktop
    groups={groups}
    defaultValue={ defaultValue }
    onChange={
      (selectedGroups) => console.log(selectedGroups)
    }
  />,

  mountNode,
)

IClassGroup

属性 说明 类型 默认值
groupName 群名 string -
groupType 群类型 'officialClassGroup' | 'teacherStudentGroup' -
groupAvatar? 群头像 string -
classId 班级 id number -
className 班级名(部门) string -
studentCount? 班级学生数 number -

IMyClassGroupSelectorProps

属性 说明 类型 默认值
defaultValue? 默认值选中值 IClassGroup[] -
value? 指定选中值 IClassGroup[] -
groups? 群列表 IClassGroup[] -
onChange? 选中值变化时的回调,注意返回的数组 (selected: IClassGroup[]) => void; -

教育开放数据源

Readme

Keywords

none

Package Sidebar

Install

npm i edu-react-my-class-group-selector

Weekly Downloads

0

Version

0.1.3

License

MIT

Unpacked Size

17.5 kB

Total Files

8

Last publish

Collaborators

  • myhere