alibaba / lowcode-engine

An enterprise-class low-code technology stack with scale-out design / 一套面向扩展设计的企业级低代码技术体系
https://lowcode-engine.cn
MIT License
14.66k stars 2.55k forks source link

demo项目 antd下拉组件BUG反馈 #1305

Open huangapple opened 1 year ago

huangapple commented 1 year ago

Describe the bug (required) / 详细描述 bug(必填)

demo项目 antd下拉组件BUG反馈


To Reproduce (required) / 如何复现 bug?(必填,非常重要)

Steps to reproduce the behavior: / 详细复现步骤:


中文版示例:

  1. 打开 demo
  2. 拖动一个下拉菜单
  3. 在大纲树点一下导航菜单; image 此时就会显示 组件渲染异常

以下是schema

{
  "componentName": "Page",
  "id": "node_dockcviv8fo1",
  "props": {
    "ref": "outerView",
    "style": {
      "height": "100%"
    }
  },
  "fileName": "/",
  "dataSource": {
    "list": [
      {
        "type": "fetch",
        "isInit": true,
        "options": {
          "params": {},
          "method": "GET",
          "isCors": true,
          "timeout": 5000,
          "headers": {},
          "uri": "mock/info.json"
        },
        "id": "info"
      }
    ]
  },
  "state": {
    "text": {
      "type": "JSExpression",
      "value": "\"outer\""
    },
    "isShowDialog": {
      "type": "JSExpression",
      "value": "false"
    }
  },
  "css": "body {\n  font-size: 12px;\n}\n\n.button {\n  width: 100px;\n  color: #ff00ff\n}",
  "lifeCycles": {
    "componentDidMount": {
      "type": "JSFunction",
      "value": "function componentDidMount() {\n  console.log('did mount');\n}"
    },
    "componentWillUnmount": {
      "type": "JSFunction",
      "value": "function componentWillUnmount() {\n  console.log('will unmount');\n}"
    }
  },
  "methods": {
    "testFunc": {
      "type": "JSFunction",
      "value": "function testFunc() {\n  console.log('test func');\n}"
    },
    "onClick": {
      "type": "JSFunction",
      "value": "function onClick() {\n  this.setState({\n    isShowDialog: true\n  });\n}"
    },
    "closeDialog": {
      "type": "JSFunction",
      "value": "function closeDialog() {\n  this.setState({\n    isShowDialog: false\n  });\n}"
    }
  },
  "originCode": "class LowcodeComponent extends Component {\n  state = {\n    \"text\": \"outer\",\n    \"isShowDialog\": false\n  }\n  componentDidMount() {\n    console.log('did mount');\n  }\n  componentWillUnmount() {\n    console.log('will unmount');\n  }\n  testFunc() {\n    console.log('test func');\n  }\n  onClick() {\n    this.setState({\n      isShowDialog: true\n    })\n  }\n  closeDialog() {\n    this.setState({\n      isShowDialog: false\n    })\n  }\n}",
  "hidden": false,
  "title": "",
  "isLocked": false,
  "condition": true,
  "conditionGroup": "",
  "children": [
    {
      "componentName": "Dropdown",
      "id": "node_oclb4jo3p9f",
      "props": {
        "overlay": {
          "type": "JSSlot",
          "value": [
            {
              "componentName": "Menu",
              "id": "node_oclb4jo3p9o",
              "props": {
                "items": [
                  {
                    "key": "timeLinei5wd",
                    "category": "Menu.Item",
                    "children": "菜单名",
                    "title": "菜单名"
                  }
                ],
                "__component_name": "Menu",
                "defaultOpenKeys": [],
                "defaultSelectedKeys": [],
                "forceSubMenuRender": false,
                "inlineCollapsed": false,
                "inlineIndent": 0,
                "mode": "vertical",
                "multiple": false,
                "openKeys": [],
                "selectable": false,
                "selectedKeys": [],
                "subMenuCloseDelay": 0,
                "subMenuOpenDelay": 0,
                "theme": "light",
                "triggerSubMenuAction": "hover"
              },
              "hidden": false,
              "title": "",
              "isLocked": false,
              "condition": true,
              "conditionGroup": "",
              "children": [
                {
                  "componentName": "Menu.Item",
                  "id": "node_ocky01yzdq3",
                  "props": {
                    "key": "timeLinei5wd",
                    "category": "Item",
                    "title": "菜单名",
                    "children": "菜单名",
                    "__component_name": "Menu.Item"
                  },
                  "hidden": false,
                  "title": "",
                  "isLocked": false,
                  "condition": true,
                  "conditionGroup": ""
                }
              ]
            }
          ]
        },
        "__component_name": "Dropdown",
        "arrow": false,
        "disabled": false,
        "placement": "bottomLeft",
        "trigger": []
      },
      "hidden": false,
      "title": "",
      "isLocked": false,
      "condition": true,
      "conditionGroup": "",
      "children": [
        {
          "componentName": "Button",
          "id": "node_oclb4jo3p9i",
          "props": {
            "type": "link",
            "children": {
              "type": "JSSlot",
              "value": [
                {
                  "componentName": "Typography.Text",
                  "id": "node_oclb4jo3p9m",
                  "props": {
                    "children": "Hover me",
                    "style": {
                      "color": "inherit"
                    },
                    "__component_name": "Typography.Text"
                  },
                  "hidden": false,
                  "title": "",
                  "isLocked": false,
                  "condition": true,
                  "conditionGroup": ""
                },
                {
                  "componentName": "Icon",
                  "id": "node_oclb4jo3p9n",
                  "props": {
                    "type": "DownOutlined",
                    "size": 15,
                    "style": {
                      "marginLeft": 4,
                      "verticalAlign": "middle"
                    },
                    "__component_name": "Icon"
                  },
                  "hidden": false,
                  "title": "",
                  "isLocked": false,
                  "condition": true,
                  "conditionGroup": ""
                }
              ]
            },
            "__component_name": "Button"
          },
          "hidden": false,
          "title": "",
          "isLocked": false,
          "condition": true,
          "conditionGroup": ""
        }
      ]
    }
  ]
}

Screenshots (optional) / bug 截图(可选)

Sceenshots for further information. (If applicable.) / 一些有用的截图将会帮助我们更好的明确以及定位问题 image


huangapple commented 1 year ago

是导航菜单导致的。 直接拖一个导航菜单就显示渲染异常了。