描述问题:
input-image类型字段在手机端多选状态下上传图片无法上传图片(想微信朋友圈一样,可一次性上传多张图片或者一张图片)
截图或视频:
6_1721038301.mp4
如何复现(请务必完整填写下面内容):
- 你是如何使用 amis 的?
sdk - amis 版本是什么?请先在最新 beta 版本测试问题是否存在
6.3 - 粘贴有问题的完整
amis schema
代码:
{
"type": "page",
"body": {
"type": "form",
"debug": true,
"api": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/form/saveForm",
"body": [
{
"type": "input-image",
"name": "image",
"label": "image",
"multiple": true,
"receiver": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/upload/file",
"autoFill": {
"myUrl": "${items|pick:url}",
"lastUrl": "${items|last|pick:url}"
}
},
{
"type": "tpl",
"label": false,
"inline": false,
"tpl": "<strong>myUrl集合</strong>"
},
{
"type": "each",
"name": "myUrl",
"className": "mb-1",
"items": {
"type": "tpl",
"tpl": "<span class='label label-info m-l-sm inline-block mb-1'>${item}</span>"
}
},
{
"type": "tpl",
"label": false,
"inline": false,
"tpl": "<strong>lastUrl</strong>"
},
{
"type": "text",
"name": "lastUrl",
"label": "lastUrl",
"inline": false
}
]
}
}
- 操作步骤
1、进入amis官网文档找到input-image字段控件多选示例](https://baidu.github.io/amis/zh-CN/components/form/input-image#%E5%A4%9A%E9%80%89%E6%A8%A1%E5%BC%8F)
2、手机端点击上传图片,手机端会自动切换为多选模式。在这种模式下无法上传图片,必须点预览切换成单选模式下才能上传图片
3、官网的示例虽然没有这种问题,但上传多张图片,都是第一张图片
1条答案
按热度按时间jobtbby31#
我也是,那个自动上传的接口,上传文件掉了