mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-06-23 02:15:10 +08:00
parent
a19fd5450a
commit
565881c8c9
@ -84,7 +84,7 @@ const appendComponent = ({ text, type, data = {} }: ComponentItem): void => {
|
||||
const dragstartHandler = ({ text, type, data = {} }: ComponentItem, e: DragEvent) => {
|
||||
if (e.dataTransfer) {
|
||||
e.dataTransfer.setData(
|
||||
'text/html',
|
||||
'text/json',
|
||||
serialize({
|
||||
name: text,
|
||||
type,
|
||||
|
@ -165,7 +165,7 @@ const dropHandler = async (e: DragEvent) => {
|
||||
if (e.dataTransfer && parent && stageContainer.value && stage) {
|
||||
const parseDSL = getConfig('parseDSL');
|
||||
|
||||
const data = e.dataTransfer.getData('text/html');
|
||||
const data = e.dataTransfer.getData('text/json');
|
||||
|
||||
if (!data) return;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user