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

组件图表展示bug #2292

Open
tcj98 opened this issue Jul 17, 2023 · 3 comments
Open

组件图表展示bug #2292

tcj98 opened this issue Jul 17, 2023 · 3 comments
Labels
bug Something isn't working / 明确是 bug help wanted Extra attention is needed / 老铁,赚 PR 的机会来了

Comments

@tcj98
Copy link

tcj98 commented Jul 17, 2023

Describe the bug (required) / 详细描述 bug(必填)

在官网demo-general综合场景demo中,添加容器,再进行切分,随后将任意图表拖入容器中,图表不是固定大小展示,而是一直在膨胀


To Reproduce (required) / 如何复现 bug?(必填,非常重要)

Steps to reproduce the behavior: / 详细复现步骤:


  1. 打开https://lowcode-engine.cn/demo/demo-general/index.html
  2. 添加容器
  3. 将容器切分成多列
  4. 将任意图表拖入容器中

Expected behavior (required) / 预期行为(必填,非常重要)

图表固定大小,不会一直在膨胀,从而能正常使用

Screenshots (optional) / bug 截图(可选)

image
image


Environments (please complete the following information) (required): / 请提供如下信息(必填)

  • AliLowCodeEngine version: v1.1.9-beta
  • AliLowCodeEngineExt version: v1.0.6-beta.28
  • AliLowCodeEngineDemo version: v1.1.71
  • Browser Google Chrome Version 114.0.5735.198

(this information can be collected via the manual plugin / 版本信息可通过低代码用户手册插件收集)

Additional context (optional) / 更多额外信息(可选)

Any other context of the problem here. / 可以追加更多的额外信息,帮助定位问题

@JackLian JackLian added bug Something isn't working / 明确是 bug help wanted Extra attention is needed / 老铁,赚 PR 的机会来了 labels Jul 18, 2023
@github-actions
Copy link

Hello @tcj98. We totally like your proposal/feedback, PR wanted。

你好 @tcj98,我们完全同意你的提议/反馈,欢迎 PR。

@tcj98
Copy link
Author

tcj98 commented Jul 31, 2023

这个bug已经两周了,请问有进展了吗

@Cuiyansong
Copy link

Cuiyansong commented Aug 3, 2023

粗略的跟了下这个问题(Demo环境可以复现),大体原因如下:

  1. Section容器采用了@alifd/layout/view.css的Paragraph段落作为容器载体,容器会默认向下一级的非Text类型的节点添加margin-top/bottom。
.fd-layout-p-margin>* {
    margin-top: var(--page-p-el-margin); // default is 4px
    margin-bottom: var(--page-p-el-margin); // default is 4px
}

.fd-layout-p-margin>.fd-layout-text,
.fd-layout-p-margin>text {
    margin-top: 0;
    margin-bottom: 0
}
  1. FusionUI的Chart默认使用fouceFit的方式来适应容器高度和宽度,多加出来的margin会影响chart的监听判断,从而检测到容器增大,Chart要跟随增加高度,然后当Chart本身的高度加上margin,周而复始又检测到了高度变化。。。所以,在编辑模式下会出现无限递增现象。

总的来说,还是要考虑是否用其他容器组件作为容器载体,或者默认修改Paragraph的css默认margin为0px(在当前物料环境下,只是载体容器而并非段落,所以强制覆盖css也不过分,只是语义化上有点歧义)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working / 明确是 bug help wanted Extra attention is needed / 老铁,赚 PR 的机会来了
Projects
None yet
Development

No branches or pull requests

3 participants