Skip to content

Commit 24cf615

Browse files
committed
fix(chatList): fix scrollButton render
1 parent db715cc commit 24cf615

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/chatbot/chat-list.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { Component, createRef, signal, tag } from 'omi';
66

77
import classname, { getClassPrefix } from '../_util/classname';
88
import { setExportparts } from '../_util/dom';
9-
import { convertToLightDomNode } from '../_util/lightDom';
109
import type { TdChatListProps, TdChatListScrollToOptions } from './type';
1110

1211
import styles from './style/chat-list.less';
@@ -150,7 +149,7 @@ export default class Chatlist extends Component<TdChatListProps> {
150149
className={classname([`${className}__scroll__button`])}
151150
onClick={() => this.scrollList({ behavior: 'smooth', to: 'bottom' })}
152151
>
153-
{convertToLightDomNode(<t-icon-arrow-down />)}
152+
<t-icon-arrow-down className={`${className}__scroll__icon`} />
154153
</div>
155154
</div>
156155
<div ref={this.innerRef}>

src/chatbot/style/_var.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
--td-chat-list-scroll-button-radius: 20px;
3737
--td-chat-list-scroll-button-index: 50;
3838
--td-chat-list-scroll-button-transform: translate(-50%, 0);
39+
--td-chat-list-scroll-icon-top: 3px;
3940

4041
--td-chat-item-gap: 38px;
4142
--td-chat-item-header-padding: 0;

src/chatbot/style/chat-list.less

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,9 @@
5858
box-shadow: var(--td-chat-list-scroll-button-shadow);
5959
cursor: pointer;
6060
}
61+
62+
&__scroll__icon {
63+
position: relative;
64+
top: var(--td-chat-list-scroll-icon-top);
65+
}
6166
}

0 commit comments

Comments
 (0)