📌  相关文章
📜  如何在 React 元素中添加多个样式属性 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:13.995000             🧑  作者: Mango

代码示例1
style is just an Object, with css value turn to camelCase, so you could use any way to merge two object, and it should work.

ES6: style={Object.assign({}, style1, style2)}

ES7: style={{...style1, ...style2}}

lodash: style={_.merge({}, style1, style2)}