Contract.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <template>
  2. <div class="contract">
  3. <div class="coin-head">
  4. <div class="name">
  5. <div class="name-text pf400 fs12 fc666666">交易对</div>
  6. <div class="list-sort">
  7. <div class="sort-up">
  8. <img src="../../assets/icon/index/Triangle.svg" alt="" />
  9. </div>
  10. <div class="sort-bottom">
  11. <img src="../../assets/icon/index/Triangle 2.svg" alt="" />
  12. </div>
  13. </div>
  14. </div>
  15. <div class="name price">
  16. <div class="name-text pf400 fs12 fc666666">最新价</div>
  17. <div class="list-sort">
  18. <div class="sort-up">
  19. <img src="../../assets/icon/index/Triangle.svg" alt="" />
  20. </div>
  21. <div class="sort-bottom">
  22. <img src="../../assets/icon/index/Triangle 2.svg" alt="" />
  23. </div>
  24. </div>
  25. </div>
  26. <div class="name today">
  27. <div class="name-text pf400 fs12 fc666666">今日涨跌幅</div>
  28. <div class="list-sort">
  29. <div class="sort-up">
  30. <img src="../../assets/icon/index/Triangle.svg" alt="" />
  31. </div>
  32. <div class="sort-bottom">
  33. <img src="../../assets/icon/index/Triangle 2.svg" alt="" />
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. <div class="coin-body">
  39. <div class="body-item" v-for="(item, index) in 10" :key="index">
  40. <div class="item-left">
  41. <div class="coin-img">
  42. <img src="../../assets/img/index/Frame 7.svg" alt="" />
  43. </div>
  44. <div class="coin-name">
  45. <div class="upper-name pf500 fs14 fc2C3131">Bitcoin</div>
  46. <div class="letter-name pf400 fs10 fcA9A9A9">BTC</div>
  47. </div>
  48. <div class="coin-echars"></div>
  49. <div class="coin-price">
  50. <div class="upper-price pf500 fs14 fc2C3131">48.503.12</div>
  51. <div class="letter-price pf400 fs10 fcA9A9A9">¥ 4250.00</div>
  52. </div>
  53. </div>
  54. <div class="item-right pf500 fs12 fcFFFFFF">+2.18%</div>
  55. </div>
  56. </div>
  57. </div>
  58. </template>
  59. <script setup></script>
  60. <style lang="less" scoped>
  61. .contract {
  62. margin-top: 11px;
  63. .coin-head {
  64. display: flex;
  65. flex-direction: row;
  66. justify-content: flex-start;
  67. align-items: center;
  68. margin-top: 6px;
  69. width: 100%;
  70. height: 24px;
  71. .name {
  72. display: flex;
  73. flex-direction: row;
  74. justify-content: flex-start;
  75. align-items: center;
  76. height: 24px;
  77. .list-sort {
  78. display: flex;
  79. flex-direction: column;
  80. justify-content: flex-start;
  81. margin-left: 4px;
  82. width: 8px;
  83. height: 16px;
  84. .sort-up,
  85. .sort-bottom {
  86. display: flex;
  87. flex-direction: row;
  88. justify-content: center;
  89. align-items: center;
  90. width: 8px;
  91. height: 8px;
  92. img {
  93. width: 8px;
  94. height: 4px;
  95. }
  96. }
  97. }
  98. }
  99. .price {
  100. margin-left: 128px;
  101. }
  102. .today {
  103. margin-left: 47px;
  104. }
  105. }
  106. .coin-body {
  107. margin-top: 9px;
  108. width: 100%;
  109. .body-item {
  110. display: flex;
  111. flex-direction: row;
  112. justify-content: flex-start;
  113. align-items: center;
  114. margin-top: 23.5px;
  115. width: 100%;
  116. height: 38px;
  117. &:nth-child(1) {
  118. margin-top: 0;
  119. }
  120. .item-left {
  121. display: flex;
  122. flex-direction: row;
  123. justify-content: flex-start;
  124. align-items: center;
  125. width: 276px;
  126. height: 100%;
  127. .coin-img {
  128. width: 32px;
  129. height: 32px;
  130. img {
  131. width: 32px;
  132. height: 32px;
  133. }
  134. }
  135. .coin-name {
  136. margin-left: 10px;
  137. width: 85px;
  138. height: 34px;
  139. .upper-name {
  140. height: 20px;
  141. line-height: 20px;
  142. }
  143. .letter-name {
  144. height: 14px;
  145. line-height: 14px;
  146. }
  147. }
  148. .coin-echars {
  149. width: 60px;
  150. height: 35px;
  151. }
  152. .coin-price {
  153. margin-left: 13px;
  154. width: 75px;
  155. height: 38px;
  156. .upper-price {
  157. height: 20px;
  158. line-height: 20px;
  159. text-align: right;
  160. }
  161. .letter-price {
  162. height: 16px;
  163. line-height: 16px;
  164. text-align: right;
  165. }
  166. }
  167. }
  168. .item-right {
  169. margin-left: 8px;
  170. width: 61px;
  171. height: 25px;
  172. line-height: 25px;
  173. text-align: center;
  174. background: #45b26b;
  175. border-radius: 5px;
  176. }
  177. }
  178. }
  179. }
  180. </style>