select-coin.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <uni-popup ref="popupRef" type="bottom">
  3. <view class="popup-box">
  4. <view class="title-box">
  5. <text class="title-name">选择币种</text>
  6. <image class="title-close" src="../../../static/logo.png" mode="aspectFit"></image>
  7. </view>
  8. <view class="content-box">
  9. <view class="search-box">
  10. <input class="search-input" placeholder-class="search-input-placeholder" placeholder="搜索您要的币种"/>
  11. <image class="search-icon" src="../../../static/logo.png" mode="aspectFit"></image>
  12. </view>
  13. <view class="content-item" v-for="(item , index) in contentList" :key="`content_${index}`">
  14. <image class="item-icon" :src="item.icon" mode="aspectFit"></image>
  15. <text class="item-text hide_1">{{item.name}}</text>
  16. </view>
  17. </view>
  18. </view>
  19. </uni-popup>
  20. </template>
  21. <script>
  22. export default {
  23. name: "exchangeSelectCoin",
  24. data() {
  25. return {
  26. contentList: [{
  27. icon: require('../../../static/icon/icon_01.png'),
  28. name: 'BTC'
  29. }, {
  30. icon: require('../../../static/icon/icon_02.png'),
  31. name: 'FIL'
  32. }, {
  33. icon: require('../../../static/icon/icon_03.png'),
  34. name: 'ETH'
  35. }, {
  36. icon: require('../../../static/icon/icon_04.png'),
  37. name: 'SHIB'
  38. }]
  39. };
  40. },
  41. mounted() {
  42. // this.$refs.popupRef.open()
  43. },
  44. methods: {
  45. open() {
  46. this.$nextTick(() => {
  47. this.$refs.popupRef.open();
  48. })
  49. }
  50. }
  51. }
  52. </script>
  53. <style lang="scss" scoped>
  54. .popup-box {
  55. width: 100%;
  56. min-height: 45vh;
  57. max-height: 75vh;
  58. border-radius: 50rpx 50rpx 0px 0px;
  59. background-color: #fff;
  60. .title-box {
  61. width: 100%;
  62. height: 113rpx;
  63. border-radius: 50rpx 50rpx 0px 0px;
  64. background-color: #F7F7F7 !important;
  65. display: flex;
  66. justify-content: space-between;
  67. align-items: center;
  68. padding: 0 $pages-padding;
  69. .title-name {
  70. font-size: 34rpx;
  71. font-family: PingFang SC, PingFang SC-Bold;
  72. font-weight: 700;
  73. text-align: center;
  74. color: #1a1a1a;
  75. line-height: 48rpx;
  76. }
  77. .title-close {
  78. width: 25rpx;
  79. height: 25rpx;
  80. // background-color: #666666;
  81. }
  82. }
  83. .content-box {
  84. width: 100%;
  85. height: calc(100% - 113rpx);
  86. padding: 0 $pages-padding 20rpx;
  87. .search-box{
  88. margin: 30rpx 0 20rpx;
  89. width: 100%;
  90. height: 60rpx;
  91. display: flex;
  92. align-items: center;
  93. background-color: #dbdce0;
  94. border-radius: 30rpx;
  95. padding: 0 30rpx;
  96. // <view class="search-box">
  97. // <input class="search-input" placeholder-class="search-input-placeholder" placeholder="请输入密码"/>
  98. // <image class="search-icon" src="../../../static/logo.png" mode="aspectFit"></image>
  99. // </view>
  100. .search-input{
  101. flex: 1;
  102. height: 100%;
  103. }
  104. .search-input,.search-input-placeholder{
  105. font-size: 24rpx;
  106. font-family: PingFang SC, PingFang SC-Regular;
  107. font-weight: 400;
  108. text-align: left;
  109. color: #333333;
  110. }
  111. .search-icon{
  112. width: 38rpx;
  113. height: 38rpx;
  114. flex-shrink: 0;
  115. }
  116. }
  117. .content-item {
  118. width: 100%;
  119. height: 66rpx;
  120. display: flex;
  121. align-items: center;
  122. .item-icon {
  123. width: 46rpx;
  124. height: 46rpx;
  125. flex-shrink: 0;
  126. }
  127. .item-text {
  128. font-size: 26rpx;
  129. font-family: PingFang SC, PingFang SC-Bold;
  130. font-weight: 700;
  131. text-align: left;
  132. color: #343434;
  133. line-height: 37rpx;
  134. padding-left: 14rpx;
  135. }
  136. }
  137. }
  138. }
  139. </style>