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

【feature】图片上传后拿到的是对象、目前我们在代码里处理获取上传的url, 是否可以直接输出url #52

Closed
1 task
changweijie opened this issue Dec 21, 2021 · 2 comments · Fixed by #117
Labels
enhancement New feature or request status: accepting pr This issue has been accepted, and we are looking for community contributors to implement this
Projects

Comments

@changweijie
Copy link

Is your feature request related to a problem? Please describe.

图片上传后拿到的是对象、目前我们在代码里处理获取上传的url, 是否可以直接输出url

Description

图片上传后拿到的是对象、目前我们在代码里处理获取上传的url, 是否可以直接输出url

Describe the solution you'd like

图片上传后拿到的是对象、目前我们在代码里处理获取上传的url, 是否可以直接输出url

Describe alternatives you've considered

No response

Self-service

  • I'd be willing to contribute this feature to DripForm myself.
@changweijie changweijie added awaiting-approval enhancement New feature or request labels Dec 21, 2021
@mengshang918 mengshang918 added this to TO DO in TODO LIST Dec 29, 2021
@mengshang918 mengshang918 added status: accepting pr This issue has been accepted, and we are looking for community contributors to implement this and removed awaiting-approval labels Dec 31, 2021
@mengshang918
Copy link
Collaborator

mengshang918 commented Jan 5, 2022

目前有两种方案支持修改数据

  1. 使用transform和parse中对表单数据进行处理。
  2. 使用afterAction对数据进行处理
    或许我们需要使transform和parse可以单独针对某一项做改动(参考:parse和transformApi可以更加灵活 #69
  3. 属性配置添加转换string类型字段
    目前存在的问题,由于upload组件存在上传一个文件和多个文件的情况,upload组件默认是object类型。如果需要默认转换为string类型,那JSONSchema当前组件的type就是['string','object','array']。当type是多类型的时候,对typeMap和generator的使用dataSchema.type的地方有影响。typeMap影响到get、set、merge等dispatch语法糖函数。我们需要在任何情况下保证获取表单数据都是string,需要对以上函数做处理。考虑到后期可能支持 parse和transformApi可以更加灵活 #69 提议,改动影响较大。详细设计方案后同 parse和transformApi可以更加灵活 #69 一起进入开发。开发进度可关注当前issue或 parse和transformApi可以更加灵活 #69 提议

总结:目前可以先采用方案一实现,后续等方案三支持后可以切换

@mengshang918
Copy link
Collaborator

#117 已支持配置exportToString转换string

TODO LIST automation moved this from TO DO to Done Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request status: accepting pr This issue has been accepted, and we are looking for community contributors to implement this
Projects
Development

Successfully merging a pull request may close this issue.

2 participants