index.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <template>
  2. <div class="single" v-if="cur">
  3. <component
  4. :answer="answer"
  5. :cur="cur"
  6. :getAnswer="getAnswer"
  7. :handleChildSrcList="handleChildSrcList"
  8. :is="getViewCom"
  9. :queIndex="queIndex"
  10. :uiType="uiType"
  11. :watchIndex="watchIndex"
  12. :bookAnswerShowFlag="bookAnswerShowFlag"
  13. :bookExamAnswer="bookExamAnswer"
  14. ref="bookChildren"
  15. />
  16. </div>
  17. </template>
  18. <script>
  19. import SelectRight from "./SelectRightAnswer.vue"; // 选择正确的句子 多个
  20. export default {
  21. name: "SingleAnswer",
  22. components: {
  23. SelectRight,
  24. },
  25. props: ["moduleType", "cur", "getAnswer", "queIndex", "answer", "uiType", "watchIndex", "handleChildSrcList","bookAnswerShowFlag","bookExamAnswer"],
  26. data () {
  27. return {
  28. // singleData: ['héng', 'shù', 'piě', 'nà']
  29. // singleData: ['4', '5', '6', '7']
  30. // singleData: ['structure1.png', 'structure2.png', 'structure3.png', 'structure4.png']
  31. //singleData: null,
  32. // singleData: [['一', '讠', '冫', '厶'], ['氵', '忄', '冫', '厶'], ['冖', '又', '冫', '厶']]
  33. // singleData: ['一', '讠', '冫']
  34. // singleData: {
  35. // data: [
  36. // ['一', '', '三', '', '', 'null', 'null'],
  37. // ['null', 'null', '', 'null', 'null', 'null', 'null'],
  38. // ['null', 'null', '', 'null', 'null', 'null', 'null'],
  39. // ['', '', '六', '七', '', '', '']
  40. // ],
  41. // optionalData: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十']
  42. // }
  43. // singleData: {
  44. // data: ["héng", "shù", "piě", "nà"],
  45. // right: ["i"],
  46. // },
  47. };
  48. },
  49. created () {
  50. console.log(this.cur)
  51. },
  52. watch: {
  53. cur: {
  54. handler: function (val, oldVal) {
  55. // let _this = this;
  56. // _this.singleData = val;
  57. // console.log(_this.singleData);
  58. },
  59. // 深度观察监听
  60. deep: true,
  61. },
  62. },
  63. mounted () {
  64. this.$nextTick(function () {
  65. this.$on('singleActiveindex', function () {
  66. this.$refs.bookChildren.$emit("singleActiveindex")
  67. });
  68. });
  69. },
  70. methods: {
  71. // getAnswer (data) {
  72. // console.log(2)
  73. // this.$emit("getAnswer", data);
  74. // }
  75. practiceTip () {
  76. return this.$refs.bookChildren.practiceJudge()
  77. }
  78. },
  79. computed: {
  80. getViewCom () {
  81. switch (this.moduleType) {
  82. case "01":
  83. return SelectRight;
  84. }
  85. }
  86. }
  87. };
  88. </script>
  89. <style lang="scss">
  90. // .single {
  91. // width: 100%;
  92. // // height: 100vh;
  93. // overflow: auto;
  94. // padding-top: 20px;
  95. // .singleNovoice {
  96. // width: 100%;
  97. // display: flex;
  98. // justify-content: center;
  99. // align-items: center;
  100. // font-family: GB-PINYINOK-B;
  101. // .content {
  102. // position: relative;
  103. // }
  104. // .content-top {
  105. // width: 444px;
  106. // height: 444px;
  107. // margin: 0 auto;
  108. // background: #ffffff url('../../assets/single/bg-rice.png') center
  109. // no-repeat;
  110. // background-size: 100% 100%;
  111. // box-shadow: 0px 6px 0px rgba(239, 167, 28, 0.4);
  112. // border-radius: 24px;
  113. // text-align: center;
  114. // position: relative;
  115. // img {
  116. // width: 300px;
  117. // margin-top: 70px;
  118. // }
  119. // .btn-play {
  120. // position: absolute;
  121. // right: 0;
  122. // top: 0;
  123. // width: 56px;
  124. // height: 56px;
  125. // background: #7663ec url('../../assets/single/icon-play.png')
  126. // center no-repeat;
  127. // background-size: 20px;
  128. // border-radius: 0 28px 0 28px;
  129. // cursor: pointer;
  130. // }
  131. // }
  132. // }
  133. // ul {
  134. // list-style: none;
  135. // margin: 0;
  136. // }
  137. // .el-message__icon {
  138. // font-size: 20px;
  139. // }
  140. // .pinyin-box {
  141. // width: 644px;
  142. // height: 444px;
  143. // box-shadow: 0px 6px 0px rgba(239, 167, 28, 0.4);
  144. // border-radius: 24px;
  145. // background: #ffffff url('../../assets/single/bg-line-red.png') center
  146. // no-repeat;
  147. // background-size: 100% 100%;
  148. // margin: 0 auto;
  149. // font-size: 240px;
  150. // line-height: 276px;
  151. // padding: 56px 0 108px 0;
  152. // font-family: GB-PINYINOK-B;
  153. // color: #404040;
  154. // text-align: center;
  155. // b {
  156. // font-weight: 400;
  157. // }
  158. // // b.active {
  159. // // color: #31d486;
  160. // // }
  161. // }
  162. // .single-input {
  163. // width: 444px;
  164. // height: 120px;
  165. // background: #ffffff;
  166. // border: 4px solid #ffffff;
  167. // box-sizing: border-box;
  168. // box-shadow: 0px 6px 0px rgba(239, 167, 28, 0.4);
  169. // border-radius: 16px;
  170. // padding: 15px 16px;
  171. // text-align: center;
  172. // outline: 0;
  173. // font-size: 80px;
  174. // line-height: 94px;
  175. // color: #494949;
  176. // // font-family: sourceR;
  177. // }
  178. // }
  179. </style>