HistoricalEntrustment.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <template>
  2. <!-- 历史委托 -->
  3. <div class="history-entrust">
  4. <div
  5. class="details-item"
  6. v-for="(item, index) in 2"
  7. :key="index"
  8. @click="detailsClick">
  9. <div class="item-name">
  10. <div class="name-left">
  11. <img src="../../../assets/icon/coin/bnb.svg" alt="" class="left-coin" />
  12. <div class="name-area">
  13. <div class="pf500 fs16 fc121212">BTC/USDT 永续</div>
  14. <div class="name-flag">
  15. <div class="flag-buy pf500 fs10 fcFFFFFF">买入</div>
  16. <div class="flag-cang pf500 fs10 fcFFFFFF">逐仓 20X</div>
  17. <div class="flag-price pf500 fs10 fcFFFFFF">市价</div>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="name-right pf500 fs12 fcFFFFFF">已失效</div>
  22. </div>
  23. <div class="item-line"></div>
  24. <div class="item-price">
  25. <div class="price-top">
  26. <div class="item-yingkui">
  27. <div class="pf500 fs12 fcA8A8A8">未实现盈亏(USDT)</div>
  28. <div class="pf500 fs12 fc45B26B">+0.2015 USDT</div>
  29. </div>
  30. <div class="item-yingkui">
  31. <div class="pf500 fs12 fcA8A8A8">下单时间</div>
  32. <div class="pf500 fs12 fc333333">2025-11-04, 16:30</div>
  33. </div>
  34. </div>
  35. <div class="price-bottom">
  36. <div class="price-item">
  37. <div class="pf500 fs12 fcA8A8A8">委托总量</div>
  38. <div class="pf500 fs12 fc333333">50.215 USDT</div>
  39. </div>
  40. <div class="price-item">
  41. <div class="pf500 fs12 fcA8A8A8">成交价格</div>
  42. <div class="pf500 fs12 fc333333">0.215 USDT</div>
  43. </div>
  44. <div class="price-item">
  45. <div class="pf500 fs12 fcA8A8A8">已成交量</div>
  46. <div class="pf500 fs12 fc333333">5.215 USDT</div>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. </template>
  53. <script setup>
  54. import { useRoute, useRouter } from "vue-router";
  55. const router = useRouter();
  56. const detailsClick = () => {
  57. router.push("/entrustDetails");
  58. };
  59. </script>
  60. <style lang="less" scoped>
  61. .history-entrust {
  62. display: flex;
  63. flex-direction: column;
  64. justify-content: flex-start;
  65. align-items: center;
  66. width: 100%;
  67. .details-item {
  68. display: flex;
  69. flex-direction: column;
  70. justify-content: flex-start;
  71. align-items: center;
  72. margin-top: 10px;
  73. width: 345px;
  74. height: 155px;
  75. border: 1px solid #ebebeb;
  76. border-radius: 8px;
  77. .item-name {
  78. display: flex;
  79. flex-direction: row;
  80. justify-content: space-between;
  81. align-items: center;
  82. margin-top: 10px;
  83. width: 320px;
  84. height: 40px;
  85. .name-left {
  86. display: flex;
  87. flex-direction: row;
  88. justify-content: flex-start;
  89. height: 40px;
  90. .left-coin {
  91. width: 40px;
  92. height: 40px;
  93. }
  94. .name-area {
  95. display: flex;
  96. flex-direction: column;
  97. justify-content: space-evenly;
  98. margin-left: 8px;
  99. height: 40px;
  100. .name-flag {
  101. display: flex;
  102. flex-direction: row;
  103. justify-content: flex-start;
  104. height: 15px;
  105. .flag-buy {
  106. width: 33px;
  107. height: 15px;
  108. line-height: 15px;
  109. text-align: center;
  110. background: #45b26b;
  111. border-radius: 3px;
  112. }
  113. .flag-cang {
  114. margin-left: 2px;
  115. width: 49px;
  116. height: 15px;
  117. line-height: 15px;
  118. text-align: center;
  119. background: #a8a8a8;
  120. border-radius: 3px;
  121. }
  122. .flag-price {
  123. margin-left: 2px;
  124. width: 33px;
  125. height: 15px;
  126. line-height: 15px;
  127. text-align: center;
  128. background: #a8a8a8;
  129. border-radius: 3px;
  130. }
  131. }
  132. }
  133. }
  134. .name-right {
  135. width: 56px;
  136. height: 24px;
  137. line-height: 24px;
  138. text-align: center;
  139. border-radius: 5px;
  140. background: #a8a8a8;
  141. }
  142. }
  143. .item-line {
  144. margin-top: 8px;
  145. width: 320px;
  146. height: 1.5px;
  147. background: #e9e9e9;
  148. }
  149. .item-price {
  150. margin-top: 6px;
  151. width: 320px;
  152. height: 85px;
  153. .price-top {
  154. .item-yingkui {
  155. display: flex;
  156. flex-direction: row;
  157. justify-content: space-between;
  158. align-items: center;
  159. width: 320px;
  160. height: 20px;
  161. }
  162. }
  163. .price-bottom {
  164. display: flex;
  165. flex-direction: row;
  166. justify-content: space-between;
  167. margin-top: 5px;
  168. width: 100%;
  169. height: 38px;
  170. .price-item {
  171. display: flex;
  172. flex-direction: column;
  173. justify-content: space-evenly;
  174. align-items: center;
  175. height: 38px;
  176. &:nth-child(1),
  177. &:nth-child(3) {
  178. width: 80px;
  179. }
  180. &:nth-child(2) {
  181. width: 160px;
  182. }
  183. }
  184. }
  185. }
  186. }
  187. }
  188. </style>