baidu / amis

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

Wizard 向导 step 的 api 会将之前的step中 的表单数据一起提交 #10543

Open ArrNNG opened 3 days ago

ArrNNG commented 3 days ago

描述问题:

【Wizard 向导】 【step】 的 【api】 会将之前的 【step】 中的表单数据一起提交;这样是正确的吗? 如果想要每个step的api只提交自己表单内的数据要如何做?

截图或视频:

image image image

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

  1. 你是如何使用 amis 的? sdk、官网

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

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

    {
    "type": "page",
    "body": {
    "type": "wizard",
    "initApi": "/amis/api/mock2/form/saveForm?waitSeconds=2",
    "steps": [
      {
        "api": "/amis/api/mock2/form/saveForm",
        "title": "1",
        "body": [
          {
            "name": "website1",
            "label": "网址",
            "type": "input-text"
          },
          {
            "name": "email1",
            "label": "邮箱",
            "type": "input-text"
          }
        ]
      },
      {
        "api": "/amis/api/mock2/form/saveForm",
        "title": "2",
        "body": [
          {
            "name": "website2",
            "label": "网址",
            "type": "input-text"
          },
          {
            "name": "email2",
            "label": "邮箱",
            "type": "input-text"
          }
        ]
      },
      {
        "api": "/amis/api/mock2/form/saveForm",
        "title": "3",
        "body": [
          {
            "name": "website3",
            "label": "网址",
            "type": "input-text"
          },
          {
            "name": "email3",
            "label": "邮箱",
            "type": "input-text"
          }
        ]
      }
    ]
    }
    }
  4. 操作步骤 请简单描述一下复现的操作步骤...