fix(editor): 组件拖入画布出错

fix #524
This commit is contained in:
roymondchen 2023-07-07 14:33:31 +08:00
parent a19fd5450a
commit 565881c8c9
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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;