Files
MujicaUI/docs/components/392-presence-avatars.md
T

37 lines
710 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# PresenceAvatars
## 用途
显示协作者、溢出人数及跟随入口。
## 最小示例
```go
people := []files.Collaborator{{ID: "ada", Name: "Ada Lovelace"}}
view := func(c *ui.Context) {
core.Use(c, core.Settings{})
files.PresenceAvatars(c, people, files.PresenceAvatarsOptions{})
}
ui.Render(view, 300, 100, 1)
```
## 参数
Max 默认 4;Size 默认 28;Following 为跟随 ID;Disabled 默认 false。
## 状态
默认、焦点、禁用;空数据按组件内容展示。
## 事件
Follow 返回 ID;Unfollow 请求停止跟随。
## 键盘操作
Tab 进入;左右移动;Enter 激活;Escape 关闭溢出名单。
## 限制
在线数据与跟随行为由调用方维护。