rt-chat-input 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  一个基于 Vue 3 的多模态聊天输入框组件,集成了文本输入、语音录制(支持实时转写)、文件上传等功能。零外部 UI 框架依赖,轻量且易于集成。
4
4
 
5
+ ## 预览
6
+
7
+ <p align="center">
8
+ <img src="./docs/1.png" alt="默认输入状态" width="320" />
9
+ </p>
10
+
11
+ <p align="center">
12
+ <img src="./docs/2.png" alt="语音录制模式" width="320" />
13
+ </p>
14
+
15
+ | 默认状态 | 语音录制模式 |
16
+ | :--------------------------: | :---------------------: |
17
+ | 文本输入、附件上传、语音按钮 | 波形显示、取消/编辑选项 |
18
+
5
19
  ## 特性
6
20
 
7
21
  - 🎤 **高级语音录制**:支持波形可视化、音量检测、实时 WebSocket 转写。
@@ -91,6 +105,7 @@ const handleAttach = (files) => {
91
105
  | `showVoiceButton` | `boolean` | `true` | 是否显示语音按钮 |
92
106
  | `showAttachmentButton` | `boolean` | `true` | 是否显示附件按钮 |
93
107
  | `acceptFileTypes` | `string` | `'image/*,.pdf,.doc...'` | 允许上传的文件类型(默认为常见图片及办公文档格式) |
108
+ | `onRequestPermission` | `() => Promise<boolean>` | `undefined` | 外部权限请求处理函数(返回 `true` 表示已获得权限) |
94
109
 
95
110
  #### Events
96
111