4.3.9 theme index.less里的ant-table-small样式不起作用,浏览器优先选择了antd的原样式
搜了下antd的源码,并未发现ant-table-small这个class
@superlbr node 6.11.2 导出4.3.9后,只改了DataTable里的React.PropTypes.oneOfType为PropTypes.oneOfType, route/user/detail/List.js 加 size="small", ant-table-small样式修改了ant-table-small背景底色。 他引用了node_modules\antd\lib\table\style\index.css。求解惑。 .ant-table-small > .ant-table-content > .ant-table-header > table > .ant-table-thead > tr > th, .ant-table-small > .ant-table-content > .ant-table-body > table > .ant-table-thead > tr > th, .ant-table-small > .ant-table-content > .ant-table-scroll > .ant-table-header > table > .ant-table-thead > tr > th, .ant-table-small > .ant-table-content > .ant-table-scroll > .ant-table-body > table > .ant-table-thead > tr > th, .ant-table-small > .ant-table-content > .ant-table-fixed-left > .ant-table-header > table > .ant-table-thead > tr > th, .ant-table-small > .ant-table-content > .ant-table-fixed-right > .ant-table-header > table > .ant-table-thead > tr > th, .ant-table-small > .ant-table-content > .ant-table-fixed-left > .ant-table-body-outer > .ant-table-body-inner > table > .ant-table-thead > tr > th, .ant-table-small > .ant-table-content > .ant-table-fixed-right > .ant-table-body-outer > .ant-table-body-inner > table > .ant-table-thead > tr > th { background: #fff; border-bottom: 1px solid #e8e8e8; }
计算css权重 参考: https://www.w3schools.com/css/css_specificity.asp