baidu / amis

前端低代码框架,通过 JSON 配置就能生成各种页面。
https://baidu.github.io/amis/
Apache License 2.0
17.4k stars 2.52k forks source link

Combo的syncFields同步InputTable时无限嵌套 #11057

Open thinkingc opened 1 month ago

thinkingc commented 1 month ago

描述问题:

Combo的syncFields同步InputTable时无限嵌套

截图或视频:

image

如何复现(请务必完整填写下面内容):

  1. 你是如何使用 amis 的? sdknpm其他...

  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在

  3. 粘贴有问题的完整 amis schema 代码:

    {
    "type": "page",
    "body": {
    "type": "form",
    "debug": "true",
    "data": {
      "inputTable": [
        {
          "a": "a1",
          "b": "b1",
          "c": {
            "c1": "111",
            "c2": "222"
          }
        }
      ]
    },
    "api": "https://aliyunfc-amis-mock-gmecwxibod.cn-beijing.fcapp.run/api/amis-mock/mock2/form/saveForm",
    "body": [
      {
        "type": "input-table",
        "name": "inputTable",
        "columns": [
          {
            "name": "a",
            "label": "A"
          },
          {
            "name": "b",
            "label": "B"
          },
          {
            "type": "combo",
            "name": "c",
            "multiLine": true,
            "multiple": false,
            "label": "C",
            "syncFields": [
              "inputTable"
            ],
            "items": [
              {
                "type": "input-text",
                "name": "c1",
                "required": true
              },
              {
                "type": "input-text",
                "name": "c2",
                "required": true
              }
            ]
          }
        ]
      }
    ]
    }
    }
  4. 操作步骤 反复多次输入值,打开debug看combo的数据,输入多次会造成多层嵌套。