File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
packages/pro-components/chat/chat-actionbar Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -52,4 +52,4 @@ placement | String | start | 操作栏位置。可选项:start/end/space-aroun
5252
5353名称 | 参数 | 描述
5454-- | -- | --
55- handleAction | ` (name: ChatActionsName, context: { e: MouseEvent, active: boolean }) ` 点击点赞,点踩,复制,分享,重新生成按钮时触发发
55+ actions | ` (name: ChatActionsName, context: { e: MouseEvent, active: boolean }) ` 点击点赞,点踩,复制,分享,重新生成按钮时触发发
Original file line number Diff line number Diff line change 11<t-toast id="t-toast" />
22<view class="container">
3- <t-chat-actionbar content="{{content}}" bind:handleAction ="handleAction" />
3+ <t-chat-actionbar content="{{content}}" bind:actions ="handleAction" />
44</view>
Original file line number Diff line number Diff line change 11<t-toast id="t-toast" />
22<view class="container">
3- <t-chat-actionbar content="{{content}}" bind:handleAction ="handleAction" comment="{{comment}}" />
3+ <t-chat-actionbar content="{{content}}" bind:actions ="handleAction" comment="{{comment}}" />
44</view>
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ export default class ChatActionbar extends SuperComponent {
116116 this . setData ( {
117117 pComment : isActive ? undefined : 'good' ,
118118 } ) ;
119- this . triggerEvent ( 'handleAction ' , {
119+ this . triggerEvent ( 'actions ' , {
120120 name,
121121 active : ! isActive ,
122122 } ) ;
@@ -125,12 +125,12 @@ export default class ChatActionbar extends SuperComponent {
125125 this . setData ( {
126126 pComment : isActive ? undefined : 'bad' ,
127127 } ) ;
128- this . triggerEvent ( 'handleAction ' , {
128+ this . triggerEvent ( 'actions ' , {
129129 name,
130130 active : ! isActive ,
131131 } ) ;
132132 } else {
133- this . triggerEvent ( 'handleAction ' , {
133+ this . triggerEvent ( 'actions ' , {
134134 name,
135135 } ) ;
136136 }
@@ -140,7 +140,7 @@ export default class ChatActionbar extends SuperComponent {
140140 if ( ! this . data . content ) return ;
141141 const copyContent =
142142 this . data . copyMode === 'markdown' ? this . data . content : this . data . filterSpecialChars ( this . data . content ) ;
143- this . triggerEvent ( 'handleAction ' , {
143+ this . triggerEvent ( 'actions ' , {
144144 name : 'copy' ,
145145 data : copyContent ,
146146 } ) ;
You can’t perform that action at this time.
0 commit comments