amis picker组件内嵌模式,从列表删除非首页的项,不会更新保存

ndh0cuux  于 4个月前  发布在  其他
关注(0)|答案(2)|浏览(123)
如何复现(请务必完整填写下面内容):

picker组件,内嵌模式。
从crud中选择多项,包含不在crud第一页的项,保存。
从picker列表中删除不在crud第一页的项,保存。可以发现,提交的请求中,依然保存删除的项的id。
如果从crud中去掉勾选再保存,正常。如果非内嵌模式,正常。

  1. amis 版本是什么?
    2.8.0
  2. 粘贴有问题的完整 amis schema 代码:
    把文档中picker内嵌模式的示例代码,稍做修改——只是换掉source,可以翻页
{
  "type": "page",
  "body": {
    "type": "form",
    "api": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/form/saveForm",
    "body": [
      {
        "type": "picker",
        "name": "type4",
        "joinValues": true,
        "valueField": "id",
        "labelField": "engine",
        "label": "Picker",
        "embed": true,
        "source": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/sample",
        "size": "lg",
        "value": "4,5",
        "multiple": true,
        "pickerSchema": {
          "mode": "table",
          "name": "thelist",
          "quickSaveApi": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/sample/bulkUpdate",
          "quickSaveItemApi": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/sample/$id",
          "draggable": true,
          "headerToolbar": {
            "wrapWithPanel": false,
            "type": "form",
            "className": "text-right",
            "target": "thelist",
            "mode": "inline",
            "body": [
              {
                "type": "input-text",
                "name": "keywords",
                "addOn": {
                  "type": "submit",
                  "label": "搜索",
                  "level": "primary",
                  "icon": "fa fa-search pull-left"
                }
              }
            ]
          },
          "columns": [
            {
              "name": "engine",
              "label": "Rendering engine",
              "sortable": true,
              "searchable": true,
              "type": "text",
              "toggled": true
            },
            {
              "name": "browser",
              "label": "Browser",
              "sortable": true,
              "type": "text",
              "toggled": true
            },
            {
              "name": "platform",
              "label": "Platform(s)",
              "sortable": true,
              "type": "text",
              "toggled": true
            },
            {
              "name": "version",
              "label": "Engine version",
              "quickEdit": true,
              "type": "text",
              "toggled": true
            },
            {
              "name": "grade",
              "label": "CSS grade",
              "quickEdit": {
                "mode": "inline",
                "type": "select",
                "options": [
                  "A",
                  "B",
                  "C",
                  "D",
                  "X"
                ],
                "saveImmediately": true
              },
              "type": "text",
              "toggled": true
            },
            {
              "type": "operation",
              "label": "操作",
              "width": 100,
              "buttons": [
                {
                  "type": "button",
                  "icon": "fa fa-eye",
                  "actionType": "dialog",
                  "dialog": {
                    "title": "查看",
                    "body": {
                      "type": "form",
                      "body": [
                        {
                          "type": "static",
                          "name": "engine",
                          "label": "Engine"
                        },
                        {
                          "type": "divider"
                        },
                        {
                          "type": "static",
                          "name": "browser",
                          "label": "Browser"
                        },
                        {
                          "type": "divider"
                        },
                        {
                          "type": "static",
                          "name": "platform",
                          "label": "Platform(s)"
                        },
                        {
                          "type": "divider"
                        },
                        {
                          "type": "static",
                          "name": "version",
                          "label": "Engine version"
                        },
                        {
                          "type": "divider"
                        },
                        {
                          "type": "static",
                          "name": "grade",
                          "label": "CSS grade"
                        },
                        {
                          "type": "divider"
                        },
                        {
                          "type": "html",
                          "html": "<p>添加其他 <span>Html 片段</span> 需要支持变量替换(todo).</p>"
                        }
                      ]
                    }
                  }
                },
                {
                  "type": "button",
                  "icon": "fa fa-pencil",
                  "actionType": "dialog",
                  "dialog": {
                    "position": "left",
                    "size": "lg",
                    "title": "编辑",
                    "body": {
                      "type": "form",
                      "name": "sample-edit-form",
                      "api": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/sample/$id",
                      "body": [
                        {
                          "type": "input-text",
                          "name": "engine",
                          "label": "Engine",
                          "required": true
                        },
                        {
                          "type": "divider"
                        },
                        {
                          "type": "input-text",
                          "name": "browser",
                          "label": "Browser",
                          "required": true
                        },
                        {
                          "type": "divider"
                        },
                        {
                          "type": "input-text",
                          "name": "platform",
                          "label": "Platform(s)",
                          "required": true
                        },
                        {
                          "type": "divider"
                        },
                        {
                          "type": "input-text",
                          "name": "version",
                          "label": "Engine version"
                        },
                        {
                          "type": "divider"
                        },
                        {
                          "type": "select",
                          "name": "grade",
                          "label": "CSS grade",
                          "options": [
                            "A",
                            "B",
                            "C",
                            "D",
                            "X"
                          ]
                        }
                      ]
                    }
                  }
                },
                {
                  "type": "button",
                  "icon": "fa fa-times text-danger",
                  "actionType": "ajax",
                  "confirmText": "您确认要删除?",
                  "api": "delete:https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/sample/$id"
                }
              ],
              "toggled": true
            }
          ]
        }
      }
    ]
  }
}
wribegjk

wribegjk1#

出现同样的问题,embed开启后 清空效果无效,传参还是会带上

piah890a

piah890a2#

我也遇到这个问题,有什么解决方案吗

相关问题