-
-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(sender): add onPasteFile callback #495
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -53,6 +53,7 @@ coverDark: https://mdn.alipayobjects.com/huamei_iwk9zp/afts/img/A*cOfrS4fVkOMAAA | |||||
| onSubmit | 点击发送按钮的回调 | (message: string) => void | - | - | | ||||||
| onChange | 输入框值改变的回调 | (value: string, event?: React.FormEvent<`HTMLTextAreaElement`> \| React.ChangeEvent<`HTMLTextAreaElement`> ) => void | - | - | | ||||||
| onCancel | 点击取消按钮的回调 | () => void | - | - | | ||||||
| onPasteFile | 黏贴文件的回调 | (file: File) => void | - | - | | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 确保在组件逻辑中正确实现 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion 建议完善 当前文档对
建议更新为: -| onPasteFile | 黏贴文件的回调 | (file: File) => void | - | - |
+| onPasteFile | 黏贴文件的回调,用于处理用户通过剪贴板粘贴的文件(如图片)。可以配合 `paste-image.tsx` 示例了解具体用法。注意:普通文本的粘贴事件请使用 `onPaste` 处理。 | (file: File) => void | - | - | 📝 Committable suggestion
Suggested change
|
||||||
|
||||||
```typescript | pure | ||||||
type SpeechConfig = { | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that the
onPasteFile
callback is properly implemented in the component logic to handle file pasting events effectively.