table.less 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. @import "../variate.less";
  2. // 修改默认的el-table的表头样式
  3. .@{elNamespace}-table{
  4. //border-top:1px solid #ebeef5;
  5. thead tr, thead tr th{
  6. color: #333;
  7. background: @tableHeadColor !important;
  8. font-weight: @tableHeadFontWeight !important;
  9. }
  10. &__expanded-cell{
  11. background: @tableHeadColor !important;
  12. &:hover{
  13. background: @tableHeadColor !important;
  14. }
  15. }
  16. .cell{
  17. line-height: 29px;
  18. .cip-switch__wrapper{
  19. line-height: inherit;
  20. }
  21. }
  22. &--small{
  23. thead tr, thead tr th{
  24. padding: 7px 0 !important;
  25. }
  26. .cell{
  27. line-height: 23px;
  28. }
  29. }
  30. [class*=el-table__row--level] .el-table__expand-icon {
  31. line-height: 32px;
  32. height: 29px;
  33. }
  34. }
  35. // 筛选按钮
  36. .@{elNamespace}-table-filter__bottom {
  37. display: flex;
  38. justify-content: center;
  39. padding: 8px 16px;
  40. border: none;
  41. button {
  42. width: 48px;
  43. height: 24px;
  44. border-radius: 2px;
  45. font-size: 12px;
  46. &:first-child {
  47. color: #fff;
  48. background: #3786fd;
  49. margin-right: 8px;
  50. }
  51. &:last-child {
  52. background: #ffffff;
  53. border: 1px solid #d9d9d9;
  54. }
  55. }
  56. }
  57. // 历史遗留问题,需要将padding设置为10px
  58. .@{elNamespace}-table{
  59. .cell{
  60. padding: 0 10px;
  61. }
  62. }