index.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <script>
  2. import { Table as ElTable, TableColumn as ElTableColumn } from "element-ui";
  3. export default {
  4. name: "BasicTable",
  5. components: {
  6. ElTable,
  7. ElTableColumn,
  8. },
  9. data() {
  10. return {};
  11. },
  12. };
  13. </script>
  14. <template>
  15. <el-table
  16. class="basic-table"
  17. style="width: 100%"
  18. header-row-class-name="basic-table-header-row"
  19. row-class-name="basic-table-row"
  20. v-bind="$attrs"
  21. v-on="$listeners"
  22. >
  23. <slot />
  24. </el-table>
  25. </template>
  26. <style lang="less">
  27. .basic-table.el-table {
  28. background: none;
  29. }
  30. .basic-table.el-table .basic-table-header-row {
  31. background-color: transparent;
  32. }
  33. .basic-table.el-table .basic-table-header-row .el-table__cell {
  34. background-color: rgba(0, 133, 255, 0.25);
  35. text-align: center;
  36. color: #fff;
  37. border-bottom: none;
  38. }
  39. .basic-table.el-table .basic-table-row {
  40. background-color: transparent;
  41. }
  42. .basic-table.el-table .basic-table-row:hover {
  43. cursor: pointer;
  44. }
  45. .basic-table.el-table .basic-table-row .el-table__cell {
  46. background-color: rgba(7, 61, 100, 0.35);
  47. color: #fff;
  48. border-bottom: 1px dashed #5290a7;
  49. text-align: center;
  50. }
  51. .basic-table.el-table .basic-table-row:nth-last-child(1) .el-table__cell {
  52. border-bottom: none;
  53. }
  54. .basic-table.el-table.el-table--enable-row-hover
  55. .el-table__body
  56. tr:hover
  57. > td.el-table__cell {
  58. background-color: rgba(0, 213, 255, 0.2);
  59. }
  60. .basic-table.el-table tr {
  61. background-color: transparent;
  62. color: #fff;
  63. }
  64. .basic-table.el-table .basic-table-row {
  65. width: 100%;
  66. }
  67. .basic-table.el-table::before {
  68. height: 0px;
  69. }
  70. // .basic-table.el-table td.el-table__cell, .basic-table.el-table th.el-table__cell.is-leaf {
  71. // background-color: rgba(7, 61, 100, .35) !important;
  72. // color: #fff;
  73. // border-bottom: 1px solid #5290a7;
  74. // }
  75. // .basic-table.el-table .el-table__header-wrapper th.el-table__cell.is-leaf {
  76. // background-color: rgba(0, 133, 255, .25) !important;
  77. // color: #fff;
  78. // border-bottom: none;
  79. // }
  80. // .basic-table.el-table .el-table__column-resize-proxy {
  81. // border-bottom-width: 0px;
  82. // }
  83. </style>