opentiny/tiny-engine

🐛 [Bug]: 拖拽到子组件中,父组件会一起消失

Closed this issue · 7 comments

Environment

edge

Version

latest

Version

latest

Link to minimal reproduction

{
  "state": {},
  "methods": {},
  "componentName": "Page",
  "css": "",
  "props": {},
  "lifeCycles": {},
  "children": [
    {
      "componentName": "div",
      "props": {},
      "id": "85375559",
      "children": [
        {
          "componentName": "TinySwitch",
          "props": {
            "modelValue": ""
          },
          "id": "33433546"
        },
        {
          "componentName": "TinySwitch",
          "props": {
            "modelValue": ""
          },
          "id": "33433543"
        }
      ]
    }
  ],
  "dataSource": {
    "list": []
  },
  "utils": [],
  "bridge": [],
  "inputs": [],
  "outputs": [],
  "fileName": "DemoPage"
}

Step to reproduce

1.选种div
2.然后将div拖入到2个组件中间,松开
3.div一起消失了

演示代码为官方示例地址。

What is expected

No response

What is actually happening

No response

Any additional comments (optional)

No response

Bot detected the issue body's language is not English, translate it automatically.


Title: 🐛 [Bug]: When dragged into a child component, the parent component will disappear together.

阿里的是在移动的时候就判断不能拖入的(大纲会显示红框)

Bot detected the issue body's language is not English, translate it automatically.


Alibaba determines that it cannot be dragged in when moving (the outline will display a red box)

@gene9831 评估一下是bug还是需求

Bot detected the issue body's language is not English, translate it automatically.


@gene9831 Evaluate whether it is a bug or a requirement

@gene9831 评估一下是bug还是需求

是bug。拖拽节点时,能成为被拖拽节点的子孙节点,这一部分缺少判断逻辑

Bot detected the issue body's language is not English, translate it automatically.


@gene9831 Evaluate whether it is a bug or a requirement

It's a bug. When dragging a node, it can become a descendant node of the dragged node. This part lacks judgment logic.