- classNames
const bottomCardSty=classNames({
[styles.ownBHeight]: true,
[styles.isBChecked]: checked,
[styles.noBChecked]: !checked,
[styles.noBCheckedMq]:!checked&&dataSet.dsCodeType==3,
})
const cx=classNames.bind(styles)
const topCardSty=cx({
ownHeight: true,
isChecked: checked,
noChecked: !checked,
noCheckedMq:!checked&&dataSet.dsCodeType==3,
})
- immutability-helper
//set 嵌套设值
update(chart, {
option: {
[axisType]: {
[type]: {
fontSize: { $set: num }
}
}
}
})
update(seriesItemTemplate.data, {
$merge: editSeriesItem.data
})
- less
@basicHeight:50vh;
@openEditorMarginLeft:160px;
.ownHeight{
height:@basicHeight
}
.isChecked{
height:@basicHeight
}
.noChecked{
height: calc(@basicHeight - 38vh)
}
.noCheckedMq{
height: calc(@basicHeight - 30vh)
}