Skip to content
Open

Fix/md #4378

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/uniapp-pro-components/chat/chat-list/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,9 @@ scroll | `(context: TdChatScrollContext)` | 滚动事件的回调。[详细类
名称 | 描述
-- | --
actionbar | 自定义操作按钮的插槽

### ChatList Methods

名称 | 参数 | 返回值 | 描述
-- | --
scrollToBottom | - | - | 对话列表过长时,以及发送新消息时,需要将对话列表滚动到底部,支持对话列表重新滚动回底部的方法。
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scrollToBottom是组件实例方法

4 changes: 4 additions & 0 deletions packages/uniapp-pro-components/chat/chat-list/chat-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,16 @@ export default {
if (!this.reverse && this.virtualList) {
this.addFragment();
}
//向父组件发射该事件,用于满足开发者滚动分页加载的需求
this.$emit('handlerScrollToUpper')
Copy link
Copy Markdown
Collaborator

@zydemail zydemail May 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1、api规范使用scrollToUpper
2、原生小程序版本需要同步支持scrollToUpper
3、chat-list的events文档新增scrollToUpper说明

},

handlerScrollToLower() {
if (this.reverse && this.virtualList) {
this.addFragment();
}
//向父组件发射该事件,用于满足开发者滚动分页加载的需求
this.$emit('handlerScrollToLower')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1、api规范使用scrollToLower
2、原生小程序版本需要同步支持scrollToLower
3、chat-list的events文档新增scrollToLower说明

},

resetFragments() {
Expand Down
2 changes: 2 additions & 0 deletions packages/uniapp-pro-components/chat/chat-message/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ message-longpress | `(detail: { id: string, longPressPosition: { x: number, y: n

名称 | 描述
-- | --
content | 自定义`content` 显示内容(props中传入的content优先级高于插槽)
avatar | 自定义 `avatar` 显示内容
datetime | 自定义 `datetime` 显示内容
name | 自定义 `name` 显示内容
actionbar | 自定义`actionbar` 操作栏
Loading