如何替换 Vaadin 中 UI 元素(例如表格)的样式
我想更换自定义表格的样式。
通过使用
fooTable.setStyleName("v-tableII");
会产生以下结果
<div class="v-table v-table-v-tableII v-tableII" ...
(grrr)
替换“v-table”样式很重要,因为它属于另一个自定义表。
有没有办法为不同的桌子使用不同的样式? (帮助建议使用addStyle,但原来的“v-table”样式是为另一个自定义表格量身定制的)
提前感谢您的回答。
CS
I would like to replace the style of custom table.
By using
fooTable.setStyleName("v-tableII");
produces the following result
<div class="v-table v-table-v-tableII v-tableII" ...
(grrr)
It would be important to replace the 'v-table' style because it belongs to another customized table.
Is there any way using different styles for different tables ?
(The help recommends to using addStyle, but the original 'v-table' style is tailored to another custom table )
Thanks for answers in advance.
Cs
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这就是 vaadin 的工作原理,您将永远拥有它。您正在使用正确的选项 fooTable.setStyleName("v-tableII") 但您是否记得将其添加到您的 css 文件中?在某些情况下,您可能必须对某些选项设置 !important。
This is how vaadin works and you will always have that. You are using the correct option fooTable.setStyleName("v-tableII") but have you remember to add this to your css file? In some cases you might have to set !important on some of the options.