index.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <div class="param-list">
  3. <div class="param__row" v-for="(item, index) in paramList" :key="index">
  4. <template v-for="(param, index) in item">
  5. <div class="col param__row-name" :key="'name' + index" v-text="param.paramName"></div>
  6. <div class="col param__row-content" :key="'content' + index" v-text="param.paramContent"></div>
  7. </template>
  8. </div>
  9. </div>
  10. </template>
  11. <script>
  12. export default {
  13. props: {
  14. paramList: {
  15. type: Array,
  16. default: () => [],
  17. },
  18. },
  19. }
  20. </script>
  21. <style lang="scss" scoped>
  22. @media screen and (min-width: 768px) {
  23. .param-list {
  24. width: 100%;
  25. word-break: break-all;
  26. text-align: justify;
  27. padding: 16px 0;
  28. .param__row {
  29. display: table-row;
  30. width: 100%;
  31. }
  32. .col {
  33. display: table-cell;
  34. font-size: 16px;
  35. padding: 8px 0;
  36. &.param__row-name {
  37. color: #666;
  38. padding-right: 32px;
  39. white-space: nowrap;
  40. border-right: 1px solid #d8d8d8;
  41. text-align: right;
  42. }
  43. &.param__row-content {
  44. color: #4e4e4e;
  45. padding-left: 32px;
  46. }
  47. }
  48. }
  49. }
  50. @media screen and (max-width: 768px) {
  51. .param-list {
  52. width: 100%;
  53. word-break: break-all;
  54. text-align: justify;
  55. .param__row {
  56. display: table-row;
  57. width: 100%;
  58. &:first-child {
  59. .col {
  60. padding-top: 0;
  61. }
  62. }
  63. &:last-child {
  64. .col {
  65. padding-bottom: 0;
  66. }
  67. }
  68. }
  69. .col {
  70. display: table-cell;
  71. font-size: 3.6vw;
  72. padding: 1.6vw 0;
  73. &.param__row-name {
  74. color: #282828;
  75. padding-right: 3.2vw;
  76. font-weight: bold;
  77. white-space: nowrap;
  78. border-right: 0.2vw solid #d8d8d8;
  79. }
  80. &.param__row-content {
  81. color: #4e4e4e;
  82. padding-left: 3.2vw;
  83. }
  84. }
  85. }
  86. }
  87. </style>