mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
fix: 缩略图拖拽至画布出现文本元素
This commit is contained in:
parent
f80e119aa0
commit
f3e8c13dde
@ -12,7 +12,7 @@ export default (elementRef: Ref<HTMLElement | undefined>) => {
|
||||
|
||||
// 拖拽元素到画布中
|
||||
const handleDrop = (e: DragEvent) => {
|
||||
if (!e.dataTransfer) return
|
||||
if (!e.dataTransfer || e.dataTransfer.items.length === 0) return
|
||||
const dataTransferItem = e.dataTransfer.items[0]
|
||||
|
||||
// 检查事件对象中是否存在图片,存在则插入图片,否则继续检查是否存在文字,存在则插入文字
|
||||
|
@ -12,6 +12,7 @@
|
||||
:animation="300"
|
||||
:scroll="true"
|
||||
:scrollSensitivity="50"
|
||||
:setData="null"
|
||||
@end="handleDragEnd"
|
||||
itemKey="id"
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user