baidu / amis

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

表单里面有个crud,阻止了表单回车提交,但是crud 回车查询也不管用了,希望crud查询生效,底层表单不生效,如何设置 #10537

Open lengqingfeng opened 3 months ago

lengqingfeng commented 3 months ago

描述问题:

表单里面有个crud,阻止了表单回车提交,但是crud 回车查询也不管用了,希望crud查询生效,底层表单不生效,如何设置

截图或视频:

可以的话,尽可能提供截图或视频来补充描述你的问题...

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

  1. 你是如何使用 amis 的? sdk 6.3

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

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

    {
    "type": "page",
    "title": {
    "type": "tpl",
    "tpl": "供应商任务流程表",
    "id": "u:bdf32a2b5629",
    "className": "font-bold"
    },
    "body": [
    {
      "type": "page",
      "body": [
        {
          "type": "form",
          "data": {
            "table": [
              {
                "a": "a1111111",
                "b": "b122222",
                "c": "ccccc1",
                "d": "ddddd1",
                "e": "eeeeeeeeee1",
                "f": "fffffffffff1"
              },
              {
                "a": "a211111",
                "b": "b21222222",
                "c": "ccccc1",
                "d": "ddddd1",
                "e": "eeeeeeeeee1",
                "f": "fffffffffff1"
              },
              {
                "a": "a22222223",
                "b": "b2333333333",
                "c": "ccccc1",
                "d": "ddddd1",
                "e": "eeeeeeeeee1",
                "f": "fffffffffff1"
              }
            ]
          },
          "api": "/amis/api/mock2/form/saveForm",
          "body": [
            {
              "type": "input-text",
              "label": "文本",
              "name": "text",
              "id": "u:fb9b0c263d4d"
            },
            {
              "type": "crud",
              "syncLocation": false,
              "api": {
                "method": "get",
                "url": "https://aisuda.bce.baidu.com/"
              },
              "bulkActions": [],
              "itemActions": [],
              "columns": [
                {
                  "name": "id",
                  "label": "ID",
                  "type": "text",
                  "id": "u:1cd5e48229ac"
                },
                {
                  "name": "engine",
                  "label": "渲染引擎",
                  "type": "text",
                  "id": "u:467dafd343bf"
                }
              ],
              "id": "u:d89f3e6c5818",
              "perPageAvailable": [
                5,
                10,
                20,
                50,
                100
              ],
              "messages": {},
              "filter": {
                "title": "查询条件",
                "body": [
                  {
                    "type": "input-text",
                    "name": "keywords",
                    "label": "关键字",
                    "id": "u:aecd2a75cf13"
                  }
                ],
                "id": "u:145cace4f0ae",
                "actions": [
                  {
                    "type": "submit",
                    "label": "搜索",
                    "primary": true,
                    "id": "u:d0611d076c2f"
                  }
                ],
                "feat": "Insert"
              }
            }
          ],
          "id": "u:979867877625",
          "actions": [
            {
              "type": "submit",
              "label": "提交",
              "primary": true,
              "id": "u:b4e1bab3a1cb"
            }
          ],
          "feat": "Insert",
          "dsType": "api",
          "preventEnterSubmit": true
        }
      ],
      "id": "u:019e00859d5b",
      "asideResizor": false,
      "pullRefresh": {
        "disabled": true
      },
      "regions": [
        "body",
        "toolbar",
        "header"
      ]
    }
    ],
    "css": {
    ".item-columns-custom-combo": {
      "padding-left": "calc(var(--Form-group-gutterWidth) / 2)",
      "padding-right": "calc(var(--Form-group-gutterWidth) / 2)",
      "flex-shrink": "0",
      "flex-grow": "1"
    },
    ".form-item-gutter-custom-lr": {
      "padding-left": "calc(var(--Form-group-gutterWidth) / 2)",
      "padding-right": "calc(var(--Form-group-gutterWidth) / 2)"
    },
    ".custom-form-group-input > div": {
      "padding": "0 !important"
    },
    ".max-w-2": {
      "max-width": "50%"
    },
    ".max-w-3": {
      "max-width": "33.333333%"
    },
    ".max-w-4": {
      "max-width": "25%"
    },
    ".pr-0-imp": {
      "padding-right": "0 !important"
    }
    },
    "cssVars": {
    "--Table-searchableForm-backgroundColor": "#ffffff",
    "--Form-group-gutterWidth": "1.5rem",
    "--dialog-header-fontSize": "16px",
    "--dialog-header-fontWeight)": "bold"
    },
    "id": "u:2da83c97910d",
    "definitions": {},
    "asideResizor": false,
    "pullRefresh": {
    "disabled": true
    }
    }
  4. 操作步骤 请简单描述一下复现的操作步骤...

github-actions[bot] commented 3 months ago

👍 Thanks for this! 🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.