Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 datagrid 的 itemRenderer 中使用标签并根据验证显示标签。我需要将标签显示为粗体。为此,我给出了 fontWeight="bold"; 它不起作用,字体粗细显示正常而不是粗体。有没有其他方法可以让文本字体为粗体?
试试这个 yourLabelObject.setStyle('fontWeight','bold');
在 itemrenderer 的 set data() 方法中试试这个。
if (lblStatus) { lblStatus.fontWeight= getStyle("fontWeight"); }
愿这对你有帮助..