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

关于upload组件,error回调函数为什不能像done 一样能获取到用户自定义的返回值呢,不太方便 #1925

Closed
4 tasks done
CrazyWalks opened this issue May 20, 2024 · 1 comment · Fixed by #1988
Labels
enhancement 改进或增强 PR welcome 欢迎提交 PR 来协助实现

Comments

@CrazyWalks
Copy link

议题条件

  • 我确认已查看官方使用文档:https://layui.dev ,但没有找到相关解决方案。
  • 我确认已在 Issues 中搜索过类似的问题,但没有找到相关解决方案。
  • 我已仔细阅读: 🍀 Layui Issue 贡献指南

议题类型

功能请求

使用版本

v2.9.8

问题描述

关于upload组件,error回调函数为什不能像done 一样能获取到用户自定义的返回值呢,不太方便,,如果所有属性都能获取到res那多好啊

业务代码

error: function(index, upload){
                layer.close(upload_file_Index);
                // layer.msg('错误'); 
                // console.log(index); // 当前文件的索引
                // upload(); 重新上传的方法
            }

只有index和upload 没有用户res自定义的返回值获取

截图补充

No response

浏览器

版本 123.0.6312.86(正式版本) (64 位)

演示地址

No response

友好承诺

  • 我承诺将本着相互尊重、理解和友善的态度进行交流,共同维护 Layui 良好的社区氛围。
@Sight-wcg
Copy link
Collaborator

也许会有帮助 https://api.jquery.com/ajaxError/#on-

@Sight-wcg Sight-wcg added the enhancement 改进或增强 label May 20, 2024
@Sight-wcg Sight-wcg added the PR welcome 欢迎提交 PR 来协助实现 label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 改进或增强 PR welcome 欢迎提交 PR 来协助实现
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants