✨ feat(im): 同步输入框状态以支持粘贴功能
parent
31dc1b1198
commit
f5656c8a2f
|
|
@ -484,6 +484,8 @@ function onPaste(e: ClipboardEvent) {
|
||||||
const text = e.clipboardData?.getData('text/plain') || ''
|
const text = e.clipboardData?.getData('text/plain') || ''
|
||||||
if (text) {
|
if (text) {
|
||||||
nativeExec('insertText', text)
|
nativeExec('insertText', text)
|
||||||
|
// @paste.prevent 阻断了浏览器默认 input 事件,需手动同步草稿 / canSend,与 insertText() 路径一致
|
||||||
|
syncEditorState()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue