Appearance
MessageScroller 消息滚动区
用户在底部时可以自动跟尾。上滑阅读历史时保留当前位置。
vue
<ll-message-scroller :items="messages" auto-scroll><template #default="{ item }">{{ item.id }}</template></ll-message-scroller>Attributes
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---|---|---|---|---|
| items | 消息集合,至少要有 id | object[] | — | 必填 |
| height | 滚动区高度 px | number | — | 220 |
| auto-scroll | 在底部跟随追加 | boolean | — | false |
| label | 区域可读名称 | string | — | Messages |
Slots
| 名称 | 说明 |
|---|---|
| default | 消息内容,接收 item |