index.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. }
  14. </script>
  15. <template >
  16. <el-table
  17. class="basic-table"
  18. style="width: 100%;"
  19. header-row-class-name="basic-table-header-row"
  20. row-class-name="basic-table-row"
  21. v-bind="$attrs"
  22. v-on="$listeners"
  23. >
  24. <slot />
  25. </el-table>
  26. </template>
  27. <style lang='less'>
  28. .basic-table.el-table {
  29. background: none;
  30. }
  31. .basic-table.el-table .basic-table-header-row {
  32. background-color: transparent;
  33. }
  34. .basic-table.el-table .basic-table-header-row .el-table__cell{
  35. background-color: rgba(0, 133, 255, .25);
  36. text-align: center;
  37. color: #fff;
  38. border-bottom: none;
  39. }
  40. .basic-table.el-table .basic-table-row {
  41. background-color: transparent;
  42. }
  43. .basic-table.el-table .basic-table-row:hover {
  44. cursor: pointer;
  45. }
  46. .basic-table.el-table .basic-table-row .el-table__cell{
  47. background-color: rgba(7, 61, 100, .35) ;
  48. color: #fff;
  49. border-bottom: 1px dashed #5290a7;
  50. text-align: center;
  51. }
  52. .basic-table.el-table .basic-table-row:nth-last-child(1) .el-table__cell {
  53. border-bottom: none;
  54. }
  55. .basic-table.el-table.el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
  56. background-color: rgba(0, 213, 255, .20) ;
  57. }
  58. .basic-table.el-table tr {
  59. background-color: transparent;
  60. color: #fff;
  61. }
  62. .basic-table.el-table .basic-table-row {
  63. width: 100%;
  64. }
  65. .basic-table.el-table::before {
  66. height: 0px;
  67. }
  68. // .basic-table.el-table td.el-table__cell, .basic-table.el-table th.el-table__cell.is-leaf {
  69. // background-color: rgba(7, 61, 100, .35) !important;
  70. // color: #fff;
  71. // border-bottom: 1px solid #5290a7;
  72. // }
  73. // .basic-table.el-table .el-table__header-wrapper th.el-table__cell.is-leaf {
  74. // background-color: rgba(0, 133, 255, .25) !important;
  75. // color: #fff;
  76. // border-bottom: none;
  77. // }
  78. // .basic-table.el-table .el-table__column-resize-proxy {
  79. // border-bottom-width: 0px;
  80. // }
  81. </style>