opentiny / opentiny/tiny-engine
✨ [Feature]: 数据源配置支持无需请求配置的接口成功亦可保存
Nobody has claimed this yet.
- Dominant language
- Vue
- Stars
- 2.8k
- Forks
- 476
- Avg merge
- 17h 35m
- Merged PRs (30d)
- 1
Description
What problem does this feature solve
目前2.8.0及2.9.0版本TinyEngine在配置数据源时,必须点击“查看远程字段”按钮,且接口请求成功后,才会自动打开请求结果的面板,最后在请求结果的面板点击保存才能最终成功保存数据源的配置,但是实际上,配置远程数据源时,可以手动配置字段和静态数据,并且在画布和预览页面中,使用的数据源也并不会真正发送请求,仅使用配置的静态数据,所以配置时必须请求通接口是否必须?而且在仅需修改数据源“请求参数JSON”配置或“请求处理”相关配置时,点右上角保存无效,必须点“查看远程字段”后,在“请求结果”的面板点击“保存”,此时保存才能有效,使用体验非常不好
What does the proposed API look like
预期“远程数据源”配置支持:
- 支持点击“查看远程字段”时,可选择不请求通配置的接口,手动复制请求结果,进行快捷的字段配置
- 在仅需修改数据源“请求参数JSON”配置或“请求处理”相关配置时,点右上角保存有效
- 目前数据源配置必须对接口的返回结果做特定的数据结构转换 { code: string, msg: string, data: {items: any[], total: number} },是否考虑支持每一个数据源支持自定义的数据结构定义,毕竟不是所有接口都是多条数据场景,还有很多都是单条数据(比如数据详情接口)
- 静态数据配置仅支持简单对象数据结构,是否考虑可支持复杂对象数组结构?(单项数据对象嵌套结构)
What is your project name
TinyEngine
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by locating the remote data-source configuration flow and its save and field-preview entry points; compare the current behavior with the four requested cases. Done means the configuration can be saved without a successful request and the requested response and static-data structures are supported.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100