antvis/G6

为啥侵入我的所有祖先级元素的样式,把上面样式都清理了 #4559

ABCDdouyaer posted onGitHub

问题描述

容器父级元素样式被清理了 祖先级也加了很多标记

<img width="1248" alt="image" src="https://github.com/antvis/G6/assets/31639964/422aa382-0604-48fe-a2db-e3c02eec640c">

重现链接

https://stackblitz.com/edit/typescript-9x1cf6?file=index.ts,index.html,style.less

重现步骤

dom结构侵染

预期行为

不侵染容器祖先元素

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]
  • G6 版本: [4.5.1 ... ]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response


根据你提供的例子来看,并没侵入容器的祖先元素。看这些元素的应该是某些特性库,或者插件造成的吧。

posted by PmcFizz almost 2 years ago

除了 canvas 的 width 和 height,G6 应该不会写到 DOM 里其他样式哈,这些字段 G6 没有处理过

posted by Yanyan-Wang almost 2 years ago

确实是我自己的其他插件造成的,无痕模式没问题

posted by ABCDdouyaer almost 2 years ago

This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help.

这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

posted by github-actions[bot] 10 months ago

Fund this Issue

$0.00
Funded

Pull requests