请解释一下...
<div className={classSet({
'Cell': true,
'Cell--highlighted': highlighted,
'Cell--hovered': hovered
})}></div>
Run Code Online (Sandbox Code Playgroud)
对象 classSet 中的键是 css 类的名称。该值是一个逻辑表达式 - 如果为 true - 类将被添加到 DOM 元素,如果为 false,则不会。
该库现已弃用,请查看:https: //github.com/JedWatson/classnames
| 归档时间: |
|
| 查看次数: |
2337 次 |
| 最近记录: |