5ee89398615e5331db94c41f3a020e4259143c89.svn-base 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. <template>
  2. <div>
  3. <div class="Match-title">{{data.title}}<p class="Match-title-num">{{data.num}}</p></div>
  4. <div class="Match" v-for="(i,index) in data.FootballMatch" :key = "i.id">
  5. <div class="Match-top">
  6. <div class="Match-top-left">
  7. {{i.date}}&emsp;<span class="Match-top-name">{{i.time}}</span>
  8. </div>
  9. <div class="Match-top-left-right">
  10. <span class="Match-top-num">{{i.num}}></span>
  11. <span>让球</span>
  12. <span>大小</span>
  13. </div>
  14. </div>
  15. <div class="Match-bottom">
  16. <div class="Match-bottom-home">
  17. <div class="Match-bottom-home-left">
  18. <span>{{i.home.title}}</span>
  19. </div>
  20. <div class="Match-bottom-home-right">
  21. <div :class="{active:index == isActive&&isnum == 1}" @click="onhome(index,1)">
  22. <span>{{i.home.concede}}</span>
  23. </div>
  24. <div :class="{active:index == isActive&&isnum == 2}" @click="onhome(index,2)">
  25. <span class="sizehomeA"><i>{{i.home.size}}</i>{{i.home.sizetop}}</span>
  26. <sapn class="sizehomeB">{{i.home.sizebtm}}</sapn>
  27. </div>
  28. </div>
  29. </div>
  30. <div class="Match-bottom-away">
  31. <div class="Match-bottom-away-left">
  32. <span>{{i.away.title}}</span>
  33. </div>
  34. <div class="Match-bottom-away-right">
  35. <div :class="{active:index == isActive&&isnum == 3}" @click="onhome(index,3)">
  36. <span style="display: block;width: 100%;text-align: center;color: #FD8F26;">{{i.away.concedetop}}</span>
  37. <span>{{i.concedeawaybtm}}</span>
  38. </div>
  39. <div :class="{active:index == isActive&&isnum == 4}" @click="onhome(index,4)">
  40. <span class="sizeawayA"><i>{{i.away.size}}</i>{{i.away.sizetop}}</span>
  41. <sapn class="sizeawayB">{{i.away.sizebtm}}</sapn>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. </template>
  49. <script>
  50. export default {
  51. data() {
  52. return {
  53. isActive:null,
  54. isnum:null,
  55. data:{
  56. title:"欧洲足球锦标赛2020外围赛",
  57. num:"22",
  58. FootballMatch:[
  59. {
  60. date:"21/03",
  61. time:"11:00",
  62. num:"70",
  63. home:{
  64. title:"哈萨克斯坦",
  65. concede:"0.81",
  66. size:"大",
  67. sizetop:"2/2.5",
  68. sizebtm:"1.12",
  69. },
  70. away:{
  71. title:"苏格兰",
  72. concedetop:"05/1",
  73. concedebtm:"1.09",
  74. size:"大",
  75. sizetop:"2/2.5",
  76. sizebtm:"1.12",
  77. },
  78. },
  79. {
  80. date:"21/03",
  81. time:"11:00",
  82. num:"70",
  83. home:{
  84. title:"哈萨克斯坦",
  85. concede:"0.81",
  86. size:"大",
  87. sizetop:"2/2.5",
  88. sizebtm:"1.12",
  89. },
  90. away:{
  91. title:"苏格兰",
  92. concedetop:"05/1",
  93. concedebtm:"1.09",
  94. size:"大",
  95. sizetop:"2/2.5",
  96. sizebtm:"1.12",
  97. },
  98. },
  99. {
  100. date:"21/03",
  101. time:"11:00",
  102. num:"70",
  103. home:{
  104. title:"哈萨克斯坦",
  105. concede:"0.81",
  106. size:"大",
  107. sizetop:"2/2.5",
  108. sizebtm:"1.12",
  109. },
  110. away:{
  111. title:"苏格兰",
  112. concedetop:"05/1",
  113. concedebtm:"1.09",
  114. size:"大",
  115. sizetop:"2/2.5",
  116. sizebtm:"1.12",
  117. },
  118. }
  119. ]
  120. }
  121. }
  122. },
  123. methods: {
  124. onhome(index,isnum) {
  125. this.isActive=index
  126. this.isnum=isnum
  127. },
  128. },
  129. }
  130. </script>
  131. <style scoped="scoped">
  132. .Match-title{
  133. display:flex;
  134. justify-content:space-between;
  135. align-items: center;
  136. height: 0.88rem;
  137. font-size: .28rem;
  138. padding-left: 0.32rem;
  139. margin-bottom: 0.12rem;
  140. background: #F8F8F8
  141. }
  142. .Match-title-num{
  143. width: .3rem;
  144. height: .3rem;
  145. background: #FD8F26;
  146. font-size: .16rem;
  147. display: flex;
  148. justify-content: center;
  149. align-items: center;
  150. border-radius: 50%;
  151. margin-right: .68rem;
  152. color: #F5F5F5;
  153. }
  154. .Match{
  155. background: #fff;
  156. margin-top: 0.25rem;
  157. }
  158. .Match-top{
  159. height:0.75rem;
  160. border-bottom: 1px solid #e4e4e4;
  161. display: flex;
  162. justify-content:space-between;
  163. align-content: center;
  164. font-size: 0.25rem;
  165. }
  166. .Match-top-left{
  167. width: 40%;
  168. height: 100%;
  169. padding-left: 0.75rem;
  170. align-items: center;
  171. line-height: 0.75rem;
  172. }
  173. .Match-top-name{
  174. color: #fd8f26;
  175. }
  176. .Match-top-left-right{
  177. width: 60%;
  178. height: 100%;
  179. padding-right: 0.75rem;
  180. line-height: 0.75rem;
  181. display: flex;
  182. justify-content: space-around;
  183. }
  184. .Match-top-num{
  185. display: inline-block;
  186. width: 1rem;
  187. height: 0.75rem;
  188. line-height: 0.75rem;
  189. background: #ebebeb;
  190. text-align: center;
  191. }
  192. .Match-bottom{
  193. height: 2.5rem;
  194. display: flex;
  195. justify-content:space-between;
  196. flex-wrap: wrap;
  197. padding: 0 0.75rem 0 0.75rem;
  198. }
  199. .Match-bottom-home,.Match-bottom-away{
  200. height: 50%;
  201. width: 100%;
  202. display: flex;
  203. justify-content: space-between;
  204. }
  205. .Match-bottom-home div{
  206. height: 100%;
  207. }
  208. .Match-bottom-home-left{
  209. height: 100%;
  210. display: flex;
  211. align-items: center;
  212. color: #333333;
  213. align-content: left;
  214. font-size: 0.25rem;
  215. }
  216. .Match-bottom-home-right{
  217. width: 37%;
  218. display: flex;
  219. justify-content: space-around;
  220. align-items: center;
  221. flex-wrap: wrap;
  222. }
  223. .Match-bottom-home-right div{
  224. display: flex;
  225. align-items: center;
  226. justify-content: center;
  227. flex-wrap: wrap;
  228. width: 1rem;
  229. height: 0.8rem;
  230. border:1px solid #e4e4e4;
  231. margin-top: 0.1rem;
  232. border-radius: 0.1rem;
  233. font-size: 0.25rem;
  234. }
  235. .Match-bottom-home-right div i{
  236. font-style: normal;
  237. color: #aaaaaa;
  238. }
  239. .sizehomeA{
  240. color: #fd8f26;
  241. }
  242. .Match-bottom-away div{
  243. height: 100%;
  244. }
  245. .Match-bottom-away-left{
  246. height: 100%;
  247. display: flex;
  248. align-items: center;
  249. color: #333333;
  250. align-content: left;
  251. font-size: 0.25rem;
  252. }
  253. .Match-bottom-away-right{
  254. width: 37%;
  255. display: flex;
  256. justify-content: space-around;
  257. align-items: center;
  258. flex-wrap: wrap;
  259. }
  260. .Match-bottom-away-right div{
  261. display: flex;
  262. align-items: center;
  263. justify-content: center;
  264. flex-wrap: wrap;
  265. width: 1rem;
  266. height: 0.8rem;
  267. border:1px solid #e4e4e4;
  268. margin-top: 0.1rem;
  269. border-radius: 0.1rem;
  270. font-size: 0.25rem;
  271. }
  272. .Match-bottom-away-right div i{
  273. font-style: normal;
  274. color: #aaaaaa;
  275. }
  276. .sizeawayA{
  277. color: #fd8f26;
  278. }
  279. .active{
  280. background-color: #e4e4e4;
  281. }
  282. </style>