跳到正文
简体中文
「团队介绍」包含在 Pro 里,开通会员后显示预览。

用法

import { TeamGrid } from './TeamGrid.jsx'

<TeamGrid
  locale="en"
  departments={[{ id: 'design', name: 'Design' }]}
  members={team}               // [{ id, name, role, department, bio, city, timezone: 'Europe/Lisbon', links: [{ type: 'site' | 'mail' | 'social', href }] }]
  roles={openings}             // [{ id, title, department, place, href? }]
  loading={!team}
  onOpenRoles={() => navigate('/careers')}
  onRole={(id) => navigate('/careers/' + id)}
/>

属性

属性类型默认值作用
locale'en' | 'zh-CN' | 'es' | 'ja''en'内置文字、时间格式和示例团队的语言。
membersArray<{ id, name, role, department, bio, city, timezone, links?: Array<{ type: 'site' | 'mail' | 'social', href }> }>sample team团队成员,按顺序排列。头像插画由他们在列表中的位置和姓名首字母生成。传空数组显示空状态。
departmentsArray<{ id, name }>sample departments部门标签,按顺序排列;“全部”会自动排在最前。
rolesArray<{ id, title, department, place, href? }>sample roles最后一张卡片里的开放职位,跟随部门标签筛选。
defaultDepartmentstring'all'初始选中的部门标签。
loadingbooleanfalse加载时显示卡片骨架。
onOpenRoles / onRole() => void / (id) => void—分别在点击“查看全部职位”、选择某个职位时调用(不传 onRole 时直接打开职位的 href)。
onDepartment(id) => void—切换部门标签时调用。
labelsobject—替换任意内置文字(键名见 copy.js)。
classNamestring—加在根元素 section 上。

装进你的项目

Pro 包含这个区块的完整源码。复制指令,让你的 Agent 把它安装到项目中。

TeamGrid.jsxteam-grid.csscopy.jskit.jsxkit.cssui/base-button/ui/empty-state/ui/skeleton-shimmer/ui/sliding-tabs/tokens.cssREADME.md

区块本身、样式和文案、共用的 kit、用到的组件和 tokens.css 会一起装进同一个文件夹。