bd35f68f746e699dba772e151f1e579623256bcb.svn-base 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template lang="">
  2. <div class = "head">
  3. <div class = "row item-center" @click="isreturn()">
  4. <div class = "row item-center"><img class="img" src="../assets/st-imges/returnbox.png" /></div>
  5. <div class = "ball tit">{{name}}</div>
  6. </div>
  7. <div class = "size" v-if = "rShow">
  8. <div :class = "status.sts ? 'stus':''" @click = "toggle()">让球&大小</div>
  9. <div v-if = '!ishow' :class = "status.ride?'stus':''" @click = "tog()">1x2</div>
  10. <div v-else :class = "status.ride?'stus':''" @click = "tog()">独赢盘</div>
  11. </div>
  12. </div>
  13. </template>
  14. <script>
  15. import Bus from "../assets/bus.js";
  16. import "../css/index.css";
  17. export default {
  18. props: ["name", "ishow", "gameCode"],
  19. data() {
  20. return {
  21. isShow: "",
  22. status: {
  23. sts: true,
  24. ride: false
  25. },
  26. rShow: true //是否为棒球与网球,是则不显示
  27. // ishow:true
  28. };
  29. },
  30. methods: {
  31. toggle() {
  32. this.status.sts = true;
  33. this.status.ride = false;
  34. this.$emit("toggleStatus", this.status);
  35. this.isShow = true;
  36. Bus.$emit("show", this.isShow);
  37. },
  38. tog() {
  39. this.status.ride = true;
  40. this.status.sts = false;
  41. this.$emit("toggleRide", this.status);
  42. this.isShow = false;
  43. Bus.$emit("show", this.isShow);
  44. },
  45. isreturn() {
  46. history.go(-1);
  47. }
  48. },
  49. mounted() {
  50. Bus.$on("val", data => {
  51. this.title = data;
  52. });
  53. // console.log("gameCode", this.gameCode);
  54. },
  55. /**
  56. * 计算属性
  57. */
  58. computed: {
  59. getCode: function() {
  60. if ( this.$store.getters.getBallId == "wq") {
  61. this.rShow = false;
  62. } else {
  63. this.rShow = true;
  64. }
  65. // console.log('show', this.rshow)
  66. return this.$store.getters.getBallId;
  67. }
  68. },
  69. watch: {
  70. getCode(val) {
  71. // console.log("aaa", val);
  72. }
  73. }
  74. };
  75. </script>
  76. <style scoped>
  77. .head {
  78. display: flex;
  79. padding: 0.1rem 0.32rem;
  80. justify-content: space-between;
  81. align-items: center;
  82. background: #797777;
  83. font-size: 0.28rem;
  84. height: 0.8rem;
  85. }
  86. .head .tit {
  87. color: #f76649 !important;
  88. font-size: 0.3rem;
  89. }
  90. .tit img {
  91. width: 0.37rem;
  92. height: 0.3rem;
  93. margin-right: 0.18rem;
  94. }
  95. .head .ball {
  96. color: #ffffff;
  97. }
  98. .head .size {
  99. display: flex;
  100. align-items: center;
  101. justify-content: center;
  102. }
  103. .head .size div {
  104. margin-right: 0.1rem;
  105. font-size: 0.2rem;
  106. color: #e1e1df;
  107. }
  108. .head .size div:nth-child(2) {
  109. padding: 0 0.2rem;
  110. font-size: 0.2rem;
  111. }
  112. .head .size div {
  113. color: rgba(255, 255, 255, 0.6);
  114. display: flex;
  115. align-items: center;
  116. justify-content: center;
  117. height: 0.6rem;
  118. line-height: 0.6rem;
  119. background: #363636;
  120. padding: 0 0.1rem;
  121. border-radius: 0.08rem;
  122. }
  123. .head .size .stus {
  124. background: #adadad;
  125. color: rgba(255, 255, 255);
  126. }
  127. .img {
  128. width: 0.37rem;
  129. height: 0.3rem;
  130. margin-right: 0.18rem;
  131. }
  132. </style>