amis icon indicating copy to clipboard operation
amis copied to clipboard

InputFile 组件在form组件内没有上传按钮,在form组件外正常显示。

Open Peppa-i opened this issue 8 months ago • 2 comments

描述问题:

InputFile 组件在form组件内没有上传按钮,在form组件外正常显示。

截图或视频:

Image

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

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

  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在 6.12.0 amis编辑器中出现,渲染的页面也存在这个现象

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

{
  "type": "dialog",
  "body": [
    {
      "type": "form",
      "id": "u:d3c55f737b22",
      "title": "表单",
      "mode": "flex",
      "labelAlign": "top",
      "dsType": "api",
      "feat": "Edit",
      "body": [
        {
          "name": "files",
          "label": "附件",
          "row": 0,
          "type": "input-file",
          "id": "u:5092bf8573e1",
          "btnLabel": "文件上传",
          "multiple": false,
          "uploadType": "fileReceptor",
          "proxy": true,
          "autoUpload": true,
          "useChunk": false,
          "accept": "",
          "drag": false
        }
      ],
      "actions": [
        {
          "type": "button",
          "label": "取消",
          "onEvent": {
            "click": {
              "actions": [
                {
                  "actionType": "cancel",
                  "componentId": "u:d3c55f737b22"
                }
              ]
            }
          },
          "level": "default"
        },
        {
          "type": "button",
          "label": "提交",
          "onEvent": {
            "click": {
              "actions": [
                {
                  "actionType": "submit",
                  "componentId": "u:d3c55f737b22"
                }
              ]
            }
          },
          "level": "primary"
        }
      ],
      "static": true,
      "initApi": "",
      "api": {
        "url": "/api/storehouse-emergency-purchase/stored",
        "method": "post",
        "requestAdaptor": "",
        "adaptor": "",
        "messages": {},
        "data": {
          "purchaseId": "${id}",
          "files": "${files}"
        }
      },
      "resetAfterSubmit": true,
      "onEvent": {
        "submitSucc": {
          "weight": 0,
          "actions": [
            {
              "componentId": "u:275aeaa93780",
              "groupType": "component",
              "actionType": "search",
              "args": {}
            }
          ]
        }
      }
    },
    {
      "type": "input-file",
      "label": "文件上传",
      "autoUpload": true,
      "proxy": true,
      "uploadType": "asForm",
      "name": "aaa",
      "id": "u:f46180a98332",
      "btnLabel": "文件上传",
      "multiple": false,
      "useChunk": false,
      "accept": "",
      "drag": false,
      "colSize": "1",
      "asBlob": false,
      "formType": "asBase64",
      "asBase64": true,
      "bos": "default",
      "row": 1
    }
  ],
  "title": "归档",
  "id": "u:f628d700c566",
  "actions": [
    {
      "type": "button",
      "actionType": "cancel",
      "label": "取消",
      "id": "u:9c303a5e78e3"
    },
    {
      "type": "button",
      "actionType": "submit",
      "label": "提交",
      "id": "u:0e461ed93396",
      "level": "primary",
      "close": false,
      "confirmText": "是否确认归档?",
      "onEvent": {
        "click": {
          "weight": 0,
          "actions": [
            {
              "ignoreError": false,
              "actionType": "refresh"
            }
          ]
        }
      },
      "disabledOnAction": false
    }
  ],
  "size": "md",
  "actionType": "dialog",
  "showCloseButton": true,
  "closeOnOutside": false,
  "closeOnEsc": false,
  "showErrorMsg": true,
  "showLoading": true,
  "draggable": false,
  "editorSetting": {
    "displayName": "归档"
  }
}
  1. 操作步骤 请简单描述一下复现的操作步骤...

Peppa-i avatar Apr 25 '25 01:04 Peppa-i

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

Please review the labels and make any necessary changes.

github-actions[bot] avatar Apr 25 '25 01:04 github-actions[bot]

测试无问题,自己检查是否其他样式污染,或者版本问题?

Image

🚀 欢迎加入最大的,人数最多的,含佬量极高的Amis社区群👇

🌟Amis社区交流群【QQ1群】:717791727

🌟Amis社区交流群【QQ2群】:721182449

lhtuling avatar May 12 '25 12:05 lhtuling