opentiny / tiny-engine

TinyEngine is a low-code engine based on which you can build or develop low-code platforms in different domains/TinyEngine是一个低代码引擎,基于这个引擎可以构建或者开发出不同领域的低代码平台
https://opentiny.design/tiny-engine
MIT License
1.84k stars 286 forks source link

🐛 [Bug]: 数据源(datasource),出码与预览的数据格式和代码逻辑不一致 #772

Open langyjn opened 1 month ago

langyjn commented 1 month ago

Environment

chrome

Version

latest

Version

latest

Link to minimal reproduction

none

Step to reproduce

  1. 预览时datasource的代码,返回格式是{ code: '', msg: '', data } 1
  2. 出码后,如果使用datasource静态数据,返回格式是 data 2

最后导致代码不一致产生错误

What is expected

No response

What is actually happening

No response

What is your project name

tiny-engine develop

Any additional comments (optional)

No response

Issues-translate-bot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically.


Title: 🐛 [Bug]: Data source, the data format and code logic of code output and preview are inconsistent

chilingling commented 4 weeks ago

当前页面预览数据源对接的是静态 mock 数据。出码数据源对接的是接口配置的,会请求接口拿到数据。 原因是页面预览时,业务方配置的接口请求可能会造成跨域。

后续可能规划: 提供拓展配置,解决跨域相关问题,让页面预览真正请求接口数据。(或者提供配置项,配置请求接口数据或者是返回 mock 数据)

如果您有更好的建议,欢迎反馈或者提PR。感谢对 TinyEngine开源的贡献 @langyjn

Issues-translate-bot commented 4 weeks ago

Bot detected the issue body's language is not English, translate it automatically.


The current page preview data source is connected to static mock data. The decoding data source is connected to the interface configuration and will request the interface to get the data. The reason is that when the page is previewed, the interface request configured by the business party may cause cross-domain requests.

Possible follow-up plans: Provide extended configuration to solve cross-domain related issues and allow page preview to truly request interface data. (Or provide configuration items, configure request interface data or return mock data)

If you have better suggestions, please provide feedback or PR. Thanks for your contribution to TinyEngine open source @langyjn