【发布时间】:2019-03-02 16:41:47
【问题描述】:
我有一种情况,我只能将属性传递给 jsx 组件,但我不能使用标准的 css 类(组件不可访问,只能通过将属性传递给其父组件来设置样式)。有没有办法使用内联样式属性设置禁用按钮的背景颜色?
编辑
我得到的最接近的是 style: {[disabled=true]:{backgroundColor: "red"}} 但我得到 Uncaught ReferenceError: disabled is not defined
【问题讨论】: