usdt.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <view class="usdt-box" :rise-fall="stocksColor">
  3. <view :class="['usdt-item' ,$setColor(item.change)]" v-for="(item , index ) in usdtList"
  4. :key="`usdt_${index}`">
  5. <text class="item-title">{{ item.currency_name }}{{ item.legal_name ? `/${item.legal_name}` : '' }}</text>
  6. <text class="item-nums color">{{ item.now_price }}</text>
  7. <text class="item-ratio color">{{ item.change }}%</text>
  8. <text class="item-result"><text class="iconfont">&#xe623;</text><text class="iconfont">&#xe615;</text>{{ item.volume }}</text>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import {
  14. mapGetters
  15. } from 'vuex'
  16. export default {
  17. name: "usdtModules",
  18. props: {
  19. usdtList: {
  20. type: Array,
  21. default: () => {
  22. return []
  23. }
  24. }
  25. },
  26. data() {
  27. return {
  28. list: [
  29. '币王BiKing合约交易所代理签约邀您加入币王BiKing合约交易所代理签约邀您加入',
  30. '币王BiKing合约交易所代理签约邀您加入币王BiKing合约交易所代理签约邀您加入',
  31. '币王BiKing合约交易所代理签约邀您加入币王BiKing合约交易所代理签约邀您加入',
  32. ]
  33. };
  34. },
  35. computed: {
  36. ...mapGetters([
  37. 'stocksColor'
  38. ]),
  39. }
  40. }
  41. </script>
  42. <style lang="scss" scoped>
  43. .usdt-box {
  44. width: 100%;
  45. min-height: 218rpx;
  46. background-color: $modules-box-bg;
  47. padding: 30rpx $pages-padding 20rpx;
  48. display: flex;
  49. .usdt-item {
  50. width: 33%;
  51. display: flex;
  52. flex-direction: column;
  53. justify-content: center;
  54. align-items: center;
  55. font-family: PingFang SC, PingFang SC-Bold;
  56. font-weight: 700;
  57. .item-title {
  58. font-size: 22rpx;
  59. line-height: 30rpx;
  60. color: #1a1a1a;
  61. letter-spacing: 0.44rpx;
  62. }
  63. .item-nums {
  64. font-size: 34rpx;
  65. line-height: 53rpx;
  66. padding-top: 11rpx;
  67. letter-spacing: 0.76rpx;
  68. }
  69. .item-ratio {
  70. font-size: 22rpx;
  71. line-height: 33rpx;
  72. padding-top: 7rpx;
  73. letter-spacing: 0.44rpx;
  74. }
  75. .item-result {
  76. font-size: 20rpx;
  77. font-family: PingFang SC, PingFang SC-Regular;
  78. font-weight: 400;
  79. line-height: 33rpx;
  80. color: #808080;
  81. display: flex;
  82. align-items: center;
  83. .iconfont{
  84. font-size: 18rpx;
  85. }
  86. }
  87. }
  88. .err-item {
  89. .item-nums {
  90. color: #FF0000;
  91. }
  92. .item-ratio {
  93. color: #BE1B1B;
  94. }
  95. }
  96. }
  97. </style>