antd table组件的rowClassName 返回的是字符串,应该怎样写样式进去

                rowClassName={(record, index) => {
                  let className;
                  if (index === rowSelectedIndex) className = 'light';
                  return className;
                }}
            想让选中的行高亮,这里改怎么写?
阅读 7.8k
1 个回答

添加额外的CSS,直接在CSS里用返回的className写样式就可以了。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进