ChangeTable.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <div>
  3. <table v-if="data.length">
  4. <tbody>
  5. <tr class="title">
  6. <th width="25%">Date</th>
  7. <th width="25%">Change Type</th>
  8. <th width="50%">Details</th>
  9. </tr>
  10. <tr v-for="(items, key) in data" :key="key">
  11. <td>{{ $utils.formatTime(items.update_time) }}</td>
  12. <td>{{ items.type_name }}</td>
  13. <td>{{ items.detail }}</td>
  14. </tr>
  15. </tbody>
  16. </table>
  17. <div v-else>
  18. <el-empty description="No Data"></el-empty>
  19. </div>
  20. </div>
  21. </template>
  22. <script>
  23. export default {
  24. props: {
  25. data: {
  26. type: Array,
  27. default: () => [],
  28. }
  29. },
  30. }
  31. </script>
  32. <style lang="scss" scoped>
  33. table {
  34. width: 100%;
  35. // border-collapse: collapse;
  36. font-size: 16px;
  37. text-align: center;
  38. overflow: hidden;
  39. border-right: 1px solid #ddd;
  40. border-top: 1px solid #ddd;
  41. border-spacing: 0;
  42. tr {
  43. height: 40px;
  44. &:nth-child(1) {
  45. background-color: #004A97;
  46. }
  47. th {
  48. border-left: 1px solid #ddd;
  49. border-bottom: 1px solid #ddd;
  50. vertical-align: middle;
  51. color: #fff;
  52. // font-family: ProximaNova-Semibold;
  53. }
  54. td {
  55. border-left: 1px solid #ddd;
  56. border-bottom: 1px solid #ddd;
  57. vertical-align: middle;
  58. color: #4a596c;
  59. }
  60. }
  61. }
  62. </style>