SearchIcon.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <HeaderNav headerText="搜索" headerRight="取消"></HeaderNav>
  3. <div class="search-icon">
  4. <div class="search-input">
  5. <input
  6. type="text"
  7. class="input pf400 fs16 fc4B5563"
  8. placeholder="搜索您关心的币种" />
  9. <img src="../../assets/icon/index/search-input.svg" alt="" />
  10. </div>
  11. <div class="icon-list">
  12. <div class="icon-item" v-for="(item, index) in iconData" :key="index">
  13. <img :src="item.img" class="icon-img" alt="" />
  14. <div class="icon-name">
  15. <div class="upper-name pc600 fs16 fc1F2937">{{ item.fullName }}</div>
  16. <div class="letter-name pc400 fs14 fc4B5563">{{ item.abbreviation }}</div>
  17. </div>
  18. <div class="icon-love">
  19. <img src="../../assets/icon/index/Star.svg" alt="" />
  20. </div>
  21. </div>
  22. </div>
  23. </div>
  24. </template>
  25. <script setup>
  26. import HeaderNav from "./components/HeaderNav.vue";
  27. const iconData = [
  28. {
  29. img: require("@/assets/icon/coin/Ethereum.png"),
  30. fullName: "Ethereum",
  31. abbreviation: "ETH",
  32. },
  33. {
  34. img: require("@/assets/icon/coin/CardanoBadge.svg"),
  35. fullName: "Cardano",
  36. abbreviation: "CAR",
  37. },
  38. {
  39. img: require("@/assets/icon/coin/Dogecoin.png"),
  40. fullName: "Dogecoin",
  41. abbreviation: "DOGE",
  42. },
  43. {
  44. img: require("@/assets/icon/coin/Solana.png"),
  45. fullName: "Solana",
  46. abbreviation: "SOL",
  47. },
  48. ];
  49. </script>
  50. <style lang="less" scoped>
  51. .search-icon {
  52. display: flex;
  53. flex-direction: column;
  54. justify-content: flex-start;
  55. align-items: center;
  56. width: 100%;
  57. .search-input {
  58. position: relative;
  59. margin-top: 50px;
  60. width: 343px;
  61. height: 48px;
  62. .input {
  63. padding-left: 40px;
  64. width: 100%;
  65. height: 100%;
  66. border: 1px solid #cbd5e1;
  67. border-radius: 64px;
  68. box-sizing: border-box;
  69. outline: none;
  70. }
  71. img {
  72. position: absolute;
  73. top: 26px;
  74. left: 14px;
  75. width: 17px;
  76. height: 17px;
  77. }
  78. }
  79. .icon-list {
  80. margin-top: 24px;
  81. width: 343px;
  82. .icon-item {
  83. display: flex;
  84. flex-direction: row;
  85. justify-content: flex-start;
  86. align-items: center;
  87. width: 100%;
  88. height: 78px;
  89. border-bottom: 1px solid #e2e8f0;
  90. box-sizing: border-box;
  91. .icon-img {
  92. width: 40px;
  93. height: 40px;
  94. }
  95. .icon-name {
  96. margin-left: 12px;
  97. width: 255px;
  98. height: 46px;
  99. .upper-name {
  100. height: 22px;
  101. line-height: 22px;
  102. }
  103. .letter-name {
  104. height: 20px;
  105. line-height: 20px;
  106. }
  107. }
  108. .icon-love {
  109. margin-left: 13.5px;
  110. width: 21px;
  111. height: 20px;
  112. img {
  113. width: 100%;
  114. height: 100%;
  115. }
  116. }
  117. }
  118. }
  119. }
  120. </style>