徽章样式似乎不适用于 Vaadin 23
从Vaadin 22移至23,徽章样式似乎无法正常工作。
加载资源几乎相同:
@JsModule("@vaadin/vaadin-lumo-styles/badge.js")
@CssImport(include = "lumo-badge", value = "./styles/empty.css")
public class SomeClass...
...
envBadge.getElement().getThemeList().add("badge success");
@vaadin/vaadin-lumo-styles/badge.js确实存在于node_modules dir中...
有什么想法吗?根据文档,似乎是正确的,就像版本22中...
谢谢
moved from Vaadin 22 to 23 and badge styling seems not be working as expected.
Loading resources pretty much the same way:
@JsModule("@vaadin/vaadin-lumo-styles/badge.js")
@CssImport(include = "lumo-badge", value = "./styles/empty.css")
public class SomeClass...
...
envBadge.getElement().getThemeList().add("badge success");
@vaadin/vaadin-lumo-styles/badge.js do exists in node_modules dir...
Any idea? According to documentation, it seems right, as in version 22...
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我有同样的问题。
@JsModule("@vaadin/vaadin-lumo-styles/badge.js")
和@CssImport(include = "lumo-badge", value = "./styles/empty.css")
注释在最新的 22 版本中工作正常,但升级到 23 版本后,徽章样式停止工作。但我设法解决问题。我从 Badge 类中删除了这些注释,创建了包含内容的
frontend/themes/common-theme/theme.json
文件,最后添加了
@Theme("common-theme")
进入我的应用程序配置器I had same problem.
@JsModule("@vaadin/vaadin-lumo-styles/badge.js")
and@CssImport(include = "lumo-badge", value = "./styles/empty.css")
annotations worked fine with latest 22 version but after upgrading to 23 version, badge styles stop working.But I manage to resolve issue. I removed those annotations from my Badge class, created
frontend/themes/common-theme/theme.json
file with contentand finally I added
@Theme("common-theme")
into my app configurator我正在使用 Vaadin 14.10.1,当我在应用程序中使用徽章时,我遇到了同样的问题。我能够通过从 GitHub (https://github.com/vaadin/vaadin-lumo-styles/blob/v1.6.1/badge.html)并在主类中添加以下注释。
I am using Vaadin 14.10.1 and I was facing the same issue when I used a badge in my application. I was able to resolve this issue by creating a CSS file /frontend/styles/vaadin-badge.css from the style defined in GitHub (https://github.com/vaadin/vaadin-lumo-styles/blob/v1.6.1/badge.html) and adding the following annotation in the main class.