diff --git a/src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/ChartDataEditor.vue b/src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/ChartDataEditor.vue index ea8623f1..50eca68b 100644 --- a/src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/ChartDataEditor.vue +++ b/src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/ChartDataEditor.vue @@ -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') { diff --git a/src/views/components/element/TableElement/CustomTextarea.vue b/src/views/components/element/TableElement/CustomTextarea.vue index 5061a633..dd804bbf 100644 --- a/src/views/components/element/TableElement/CustomTextarea.vue +++ b/src/views/components/element/TableElement/CustomTextarea.vue @@ -76,7 +76,6 @@ const handleFocus = () => { if (htmlData) { emit('insertExcelData', htmlData) if (textareaRef.value) textareaRef.value.innerHTML = htmlData[0][0] - return } }) }