Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InputImage组件,回现时,点击查看大图,使用的还是perview的地址 #11729

Open
gdx945 opened this issue Mar 8, 2025 · 0 comments

Comments

@gdx945
Copy link

gdx945 commented Mar 8, 2025

描述问题:

InputImage组件,回现时,点击查看大图,使用的还是perview的地址

截图或视频:

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

Image

Image

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

  1. 你是如何使用 amis 的?
    官方文档中的编辑代码功能

  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在
    控制台amisVersionInfo显示为{version: '6.10.0', buildTime: '2024-12-24T08:12:59.592Z'}

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

{
  "type": "page",
  "body": {
    "type": "form",
    "api": "/amis/api/mock2/form/saveForm",
    "data": {
      "file": {
        "id": "2ba48d02d348",
        "value": "https://internal-amis-res.cdn.bcebos.com/images/2020-1/1578395693148/1314a2a3d3f6.jpeg@s_0,w_216,l_1,f_jpg,q_80",
        "url": "https://internal-amis-res.cdn.bcebos.com/images/2020-1/1578395693148/1314a2a3d3f6.jpeg@s_0,w_216,l_1,f_jpg,q_80",
        "preview": "https://internal-amis-res.cdn.bcebos.com/images/2020-1/1578395692942/d8e4992057f9.jpeg@s_0,w_216,l_1,f_jpg,q_80",
        "filename": "file(single).md",
        "name": "file(single).md",
        "state": "uploaded"
      }
    },
    "body": [
      {
        "type": "input-image",
        "name": "file",
        "label": "File(单选)",
        "mode": "horizontal",
        "labelAlign": "left",
        "accept": "image/jpeg, image/jpg, image/png, image/gif",
        "receiver": "/amis/api/upload/file",
        "multiple": false,
        "autoUpload": false,
        "joinValues": false,
        "onEvent": {
          "success": {
            "actions": [
              {
                "actionType": "toast",
                "args": {
                  "msgType": "info",
                  "msg": "「${event.data.path}」上传成功"
                }
              }
            ]
          }
        }
      }
    ]
  }
}
  1. 操作步骤
    input-image回现时,文件的preview和url不是同一个连接,点击查看大图时,期望展示url对应的图片,实际还是展示了preview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant