3065b165607dd9db9dce18068b4cf6de04b815d7.svn-base 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <div>
  3. <div v-for="(item,index) in data" :key="item.id">
  4. <div class="row allAlignment haderBox center">
  5. <span>123</span>
  6. <div class="Match-title-num">
  7. <span>123</span>
  8. </div>
  9. </div>
  10. <div class="box">
  11. <div class="row allAlignment item-center top-box">
  12. <span>
  13. <i>{{item.session}}</i>
  14. <b style="color:#F76649;font-weight: normal;">{{item.time}}</b>
  15. </span>
  16. <span class="top-num">{{item.num}}</span>
  17. </div>
  18. </div>
  19. <div class="box-bottom">
  20. <div class="box row item-center main-box">
  21. <span class="num-box" style="color:#eb921e">{{item.home}}</span>
  22. &nbsp;&nbsp;{{item.nameA}}
  23. </div>
  24. <div class="box row item-center main-box">
  25. <span class="num-box" style="color:#eb921e">{{item.host}}</span>
  26. &nbsp;&nbsp;{{item.nameB}}
  27. </div>
  28. <div class="box row allAlignment bottom-box center">
  29. <div
  30. class="item-center bottom-num"
  31. :class="item.istrueA==true?'active':''"
  32. @click="isclick(index,1)"
  33. >
  34. <p style="color:#eb921e">1</p>
  35. <p>{{item.odd1}}</p>
  36. </div>
  37. <div
  38. class="item-center bottom-num"
  39. :class="item.istrueB==true?'active':''"
  40. @click="isclick(index,2)"
  41. >
  42. <p style="color:#eb921e">x</p>
  43. <p>{{item.odd2}}</p>
  44. </div>
  45. <div
  46. class="item-center bottom-num"
  47. :class="item.istrueC==true?'active':''"
  48. @click="isclick(index,3)"
  49. >
  50. <p style="color:#eb921e">2</p>
  51. <p>{{item.odd3}}</p>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. </template>
  58. <script>
  59. import "../css/index.css";
  60. export default {
  61. data() {
  62. return {
  63. data: [
  64. {
  65. nameA: "圣特克拉",
  66. nameB: "智利U17",
  67. home: "0",
  68. host: "0",
  69. session: "上半场",
  70. time: "13:30",
  71. num: "10",
  72. odd1: "2.50",
  73. odd2: "2.85",
  74. odd3: "2.70"
  75. }
  76. ]
  77. };
  78. },
  79. methods: {
  80. // 点击事件确认选中
  81. isclick(index, num) {
  82. if (num == 1) {
  83. this.$set(
  84. this.data[index],
  85. "istrueA",
  86. this.data[index].istrueA == true ? false : true
  87. );
  88. } else if (num == 2) {
  89. this.$set(
  90. this.data[index],
  91. "istrueB",
  92. this.data[index].istrueB == true ? false : true
  93. );
  94. } else if (num == 3) {
  95. this.$set(
  96. this.data[index],
  97. "istrueC",
  98. this.data[index].istrueC == true ? false : true
  99. );
  100. }
  101. }
  102. },
  103. mounted() {}
  104. };
  105. </script>
  106. <style scoped>
  107. .top-box {
  108. height: 0.44rem;
  109. font-size: 0.24rem;
  110. background: #fff;
  111. border-bottom: 1px solid #e4e4e4;
  112. }
  113. .box-bottom{
  114. height: 2.9rem;
  115. }
  116. .top-num {
  117. display: inline-block;
  118. width: 0.64rem;
  119. height: 0.44rem;
  120. line-height: 0.44rem;
  121. color: #000000;
  122. text-align: center;
  123. background: #ebebeb;
  124. font-size: 0.24rem;
  125. }
  126. .box {
  127. padding: 0 0.32rem;
  128. background: #fff;
  129. }
  130. .Match-title-num {
  131. width: 0.46rem;
  132. height: 0.46rem;
  133. line-height: 0.46rem;
  134. text-align: center;
  135. background: #f76649;
  136. font-size: 0.26rem;
  137. border-radius: 50%;
  138. color: #e4e4e4;
  139. }
  140. .haderBox {
  141. padding: 0 0.32rem;
  142. height: 0.88rem;
  143. font-size: 0.32rem;
  144. background: #f8f8f8;
  145. }
  146. .main-box {
  147. height: 0.9rem;
  148. background: #fff;
  149. font-size: 0.28rem;
  150. }
  151. .bottom-box {
  152. height: 1.1rem;
  153. background: #fff;
  154. font-size: 0.24rem;
  155. }
  156. .bottom-box div {
  157. width: 1.07rem;
  158. height: 0.76rem;
  159. border: 2px solid #cecece;
  160. border-radius: 0.1rem;
  161. font-size: .24rem
  162. }
  163. .bottom-num {
  164. padding: 0.1rem;
  165. text-align: center;
  166. }
  167. .active {
  168. background: #f76649;
  169. border: 2px solid #f76649 !important;
  170. }
  171. .active > p {
  172. color: #e4e4e4 !important;
  173. }
  174. .num-box {
  175. width: 0.66rem;
  176. height: 0.34rem;
  177. background: #f76649;
  178. border-radius: 0.17rem;
  179. color: #f5f5f5 !important;
  180. line-height: 0.34rem;
  181. text-align: center;
  182. }
  183. </style>