amis inputTable中嵌套多个inputTable,其中嵌套的子inputTable保存一行数据时,其他子inputTable也会保存一行数据。

ogsagwnx  于 3个月前  发布在  其他
关注(0)|答案(1)|浏览(64)
描述问题:

inputTable中嵌套多个inputTable,其中嵌套的子inputTable保存一行数据时,其他子inputTable也会保存一行数据。

截图或视频:

Video_2024-04-09_141405_x264.mp4

如何复现(请务必完整填写下面内容):
  1. 你是如何使用 amis 的?
    sdk
  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在
    6.3.0
  3. 粘贴有问题的完整 amis schema 代码:
{
              "type": "page",
              "id": "u:57a2b54449b8",
              "toolbar": [
                {
                  "type": "button",
                  "label": "+新增一行",
                  "id": "u:2c5b928cee97",
                  "onEvent": {
                    "click": {
                      "weight": 0,
                      "actions": [
                        {
                          "componentId": "u:ac1a5a42ed72",
                          "groupType": "component",
                          "actionType": "addItem",
                          "args": {
                            "item": [
                              {}
                            ]
                          }
                        }
                      ]
                    }
                  },
                  "level": "link"
                }
              ],
              "body": [
                {
                  "type": "input-table",
                  "name": "table",
                  "label": "",
                  "columns": [
                    {
                      "label": "接口状态",
                      "name": "apiStatus",
                      "id": "u:292220c17939",
                      "quickEdit": {
                        "type": "select",
                        "options": [
                          "启用",
                          "停用"
                        ],
                        "id": "u:9a9b65e1d33f"
                      }
                    },
                    {
                      "label": "接口方式",
                      "name": "apiMethod",
                      "quickEdit": {
                        "type": "select",
                        "options": [
                          "POST",
                          "GET"
                        ],
                        "id": "u:9a9b65c1d33f"
                      },
                      "id": "u:841be0cec255"
                    },
                    {
                      "label": "请求参数",
                      "name": "requestParameters",
                      "quickEdit": {
                        "type": "flex",
                        "direction": "column",
                        "id": "u:8ee6dff1ff6a",
                        "items": [
                          {
                            "type": "input-table",
                            "columns": [
                              {
                                "label": "字段",
                                "name": "requestField",
                                "id": "u:292220c179bb"
                              },
                              {
                                "label": "字段类型",
                                "name": "requestFieldType",
                                "id": "u:292220c179cc",
                                "quickEdit": {
                                  "type": "select",
                                  "options": [
                                    "Integer",
                                    "String"
                                  ],
                                  "id": "u:9a9b65f4d3dd"
                                }
                              },
                              {
                                "label": "是否必填",
                                "name": "requestIsRequired",
                                "id": "u:292220c179ee",
                                "quickEdit": {
                                  "type": "select",
                                  "options": [
                                    "是",
                                    "否"
                                  ],
                                  "id": "u:9a9b65f1d4ff"
                                }
                              },
                              {
                                "label": "备注",
                                "name": "requestRemark",
                                "id": "u:292220c179gg"
                              }
                            ],
                            "id": "u:aa9b65f1d3hh",
                            "minLength": 0,
                            "name": "新增",
                            "addable": true,
                            "showIndex": true,
                            "removable": true,
                            "copyable": true
                          }
                        ]
                      },
                      "id": "u:8x1be0cec2jj",
                      "width": 800
                    },
                    {
                      "label": "返回参数",
                      "name": "responseParameters",
                      "quickEdit": {
                        "type": "flex",
                        "id": "u:8ee6dff1ff69",
                        "direction": "column",
                        "items": [
                          {
                            "type": "input-table",
                            "columns": [
                              {
                                "label": "字段",
                                "name": "responseField",
                                "id": "u:292220c17939"
                              },
                              {
                                "label": "字段类型",
                                "name": "responseFieldType",
                                "id": "u:292220c17939",
                                "quickEdit": {
                                  "type": "select",
                                  "options": [
                                    "Integer",
                                    "String"
                                  ],
                                  "id": "u:9a9b65f4d33f"
                                }
                              },
                              {
                                "label": "是否必填",
                                "name": "responseIsRequired",
                                "id": "u:292220c17939",
                                "quickEdit": {
                                  "type": "select",
                                  "options": [
                                    "是",
                                    "否"
                                  ],
                                  "id": "u:9a9b65f1d43f"
                                }
                              },
                              {
                                "label": "备注",
                                "name": "responseRemark",
                                "id": "u:292220c17939"
                              }
                            ],
                            "id": "u:9a9b65f1d33f",
                            "minLength": 0,
                            "name": "新增",
                            "addable": true,
                            "showIndex": true,
                            "removable": true,
                            "copyable": true
                          }
                        ]
                      },
                      "id": "u:841be0cec255",
                      "width": 800
                    },
                    {
                      "label": "代码类型",
                      "name": "glueType",
                      "quickEdit": {
                        "type": "select",
                        "id": "u:9a9ba5f1d33f",
                        "options": [
                          "JAVA",
                          "PYTHON"
                        ]
                      },
                      "id": "u:841be0cec255"
                    },
                    {
                      "label": "接口创建时间",
                      "name": "createDateTime",
                      "id": "u:841be0cec255",
                      "quickEdit": {
                        "type": "input-datetime",
                        "id": "u:9a9b6zf1d33f"
                      }
                    },
                    {
                      "label": "创建人",
                      "name": "creator",
                      "id": "u:841be0cec255"
                    },
                    {
                      "label": "备注",
                      "id": "u:841be0cec255",
                      "name": "remark"
                    },
                    {
                      "label": "操作",
                      "id": "u:8ee1b9a16a43",
                      "type": "operation",
                      "buttons": [
                        {
                          "label": "删除",
                          "type": "button",
                          "level": "link",
                          "id": "u:3bfadce79870"
                        }
                      ]
                    }
                  ],
                  "needConfirm": false,
                  "id": "u:ac1a5a42ed72",
                  "showIndex": true,
                  "draggable": true,
                  "perPage": 10,
                  "columnsTogglable": "auto"
                }
              ],
              "data": {
                "table": [
                  {
                    "a": "a1",
                    "b": "b1"
                  },
                  {
                    "a": "a2",
                    "b": "b2"
                  },
                  {
                    "a": "a3",
                    "b": "b3"
                  }
                ],
                "inputTableStatic": false
              },
              "asideResizor": false,
              "pullRefresh": {
                "disabled": true
              }
            }
  1. 操作步骤
    直接复制到amis-editor中即可
w9apscun

w9apscun1#

上面视频不完成,补发完整视频
Video_2024-04-09_141405_x264.mp4

相关问题