1、在Component的Radio中加个style={radioStyle}。

<RadioGroup>
  <Radio style={radioStyle} value={1}>多和他人谈话</Radio>
  <Radio style={radioStyle} value={2}>写下计划</Radio>>
</RadioGroup>

2、在style-components中写

export const radioStyle = {
    display: 'block',
    height: '30px',
    lineHeight: '30px',
};

3、在Component中导入即可

import {
    radioStyle,
} from './style';

4、注意两点

①要用style={radioStyle}而不是className

②注意写样式时,样式的值要加引号

 

完美修改antd的样式

相关文章:

  • 2022-01-01
  • 2022-12-23
  • 2021-09-16
  • 2021-06-05
  • 2021-06-07
  • 2021-06-08
  • 2021-10-05
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-24
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2021-05-06
相关资源
相似解决方案