gpt4 book ai didi

dart - 在Chrome中检查ngComponent

转载 作者:行者123 更新时间:2023-12-03 03:28:20 24 4
gpt4 key购买 nike

我用自己的css,html和dart文件创建了一个ngComponent。
渲染效果很好,代码可以正确运行。

但是,我通常使用Chrome的dev inspect工具并动态修改css来设置dom元素的样式。我不能再用Darium做到这一点,而且我似乎也无法进入组件的dom树。我总是停留在组件html标签上。

有任何想法吗?

最佳答案

在有角 Dart 中,Ngcomponents使用Shadow DOM实现

Components isolate their views from their surroundings by creating a shadow DOM. Using a shadow DOM allows components to be used anywhere without suffering from things like CSS name collisions.



您必须在dartium中启用Show shadow DOM功能才能查看自定义组件的模板。

关于dart - 在Chrome中检查ngComponent,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22495552/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com