Skip to content

Commit 581382b

Browse files
committed
refactor: rename event from expandChange to collapsedChange in ChatThinking component
1 parent 06814e6 commit 581382b

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

packages/pro-components/chat/chat-thinking/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ collapsed | Boolean | false | 是否折叠(受控) | N
6363

6464
名称 | 参数 | 描述
6565
-- | -- | --
66-
expand-change | `(value: Boolean)` | 展开图标点击事件。TS 类型:`TNode`[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/components/common.ts)[详细类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/pro-components/chat/type.ts)
66+
collapsedChange | `(value: Boolean)` | 展开图标点击事件。TS 类型:`TNode`[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/components/common.ts)[详细类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/pro-components/chat/type.ts)
6767

6868
### CSS Variables
6969

packages/pro-components/chat/chat-thinking/_example/complete/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Component({
88
},
99
},
1010
methods: {
11-
handleExpandChange(e) {
11+
handleCollapsedChange(e) {
1212
console.log('展开状态变化:', e.detail);
1313
},
1414
},
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<view class="chat-example-block">
2-
<t-chat-thinking content="{{content}}" layout="block" status="{{status}}" bind:expandChange="handleExpandChange" />
2+
<t-chat-thinking content="{{content}}" layout="block" status="{{status}}" bind:collapsedChange="handleCollapsedChange" />
33
</view>

packages/pro-components/chat/chat-thinking/_example/pending/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Component({
88
status: 'pending',
99
},
1010
methods: {
11-
handleExpandChange(e) {
11+
handleCollapsedChange(e) {
1212
console.log('展开状态变化:', e.detail);
1313
},
1414
},
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<view class="chat-example-block">
2-
<t-chat-thinking content="{{content}}" layout="block" status="{{status}}" bind:expandChange="handleExpandChange" />
2+
<t-chat-thinking content="{{content}}" layout="block" status="{{status}}" bind:collapsedChange="handleCollapsedChange" />
33
</view>

packages/pro-components/chat/chat-thinking/chat-thinking.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default class ChatThinking extends SuperComponent {
5656
localCollapsed: !this.data.localCollapsed,
5757
});
5858
// 通知父组件状态变化
59-
this.triggerEvent('expandChange', this.data.localCollapsed);
59+
this.triggerEvent('collapsedChange', this.data.localCollapsed);
6060
},
6161
setContentStyle() {
6262
if (this.data.maxHeight) {

0 commit comments

Comments
 (0)