usdt.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. data() {
  19. return {
  20. };
  21. },
  22. computed: {
  23. ...mapGetters([
  24. 'stocksColor',
  25. 'usdtList'
  26. ]),
  27. }
  28. }
  29. </script>
  30. <style lang="scss" scoped>
  31. .usdt-box {
  32. width: 100%;
  33. min-height: 218rpx;
  34. background-color: $modules-box-bg;
  35. padding: 30rpx $pages-padding 20rpx;
  36. display: flex;
  37. .usdt-item {
  38. width: 33%;
  39. display: flex;
  40. flex-direction: column;
  41. justify-content: center;
  42. align-items: center;
  43. font-family: PingFang SC, PingFang SC-Bold;
  44. font-weight: 700;
  45. .item-title {
  46. font-size: 22rpx;
  47. line-height: 30rpx;
  48. color: #1a1a1a;
  49. letter-spacing: 0.44rpx;
  50. }
  51. .item-nums {
  52. font-size: 34rpx;
  53. line-height: 53rpx;
  54. padding-top: 11rpx;
  55. letter-spacing: 0.76rpx;
  56. }
  57. .item-ratio {
  58. font-size: 22rpx;
  59. line-height: 33rpx;
  60. padding-top: 7rpx;
  61. letter-spacing: 0.44rpx;
  62. }
  63. .item-result {
  64. font-size: 20rpx;
  65. font-family: PingFang SC, PingFang SC-Regular;
  66. font-weight: 400;
  67. line-height: 33rpx;
  68. color: #808080;
  69. display: flex;
  70. align-items: center;
  71. .iconfont{
  72. font-size: 18rpx;
  73. }
  74. }
  75. }
  76. .err-item {
  77. .item-nums {
  78. color: #FF0000;
  79. }
  80. .item-ratio {
  81. color: #BE1B1B;
  82. }
  83. }
  84. }
  85. </style>