fix: 图表数据编辑器单元格无法粘贴(#333)

This commit is contained in:
zxc 2025-03-21 21:54:30 +08:00
parent 7f4400f34d
commit a1e47a21b1
2 changed files with 6 additions and 2 deletions

View File

@ -292,7 +292,12 @@ const handlePaste = (e: ClipboardEvent, rowIndex: number, colIndex: number) => {
if (typeof clipboardData === 'object') return
const excelData = pasteExcelClipboardString(text)
if (excelData) fillTableData(excelData, rowIndex, colIndex)
if (excelData) {
fillTableData(excelData, rowIndex, colIndex)
return
}
document.execCommand('insertText', false, text)
})
}
else if (clipboardDataFirstItem.type === 'text/html') {

View File

@ -76,7 +76,6 @@ const handleFocus = () => {
if (htmlData) {
emit('insertExcelData', htmlData)
if (textareaRef.value) textareaRef.value.innerHTML = htmlData[0][0]
return
}
})
}