MatrixSingle.vue 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <!-- -->
  2. <template>
  3. <div class="Big-Book-prev-Textdes" v-if="curQue">
  4. <div>
  5. <span></span>
  6. <span v-for="(op, OPindex) in curQue.option" :key="OPindex">
  7. {{ op.con }}
  8. </span>
  9. </div>
  10. <div
  11. class="Big-Book-prev-list"
  12. v-for="(item, index) in curQue.con"
  13. :key="index"
  14. >
  15. <span>{{ item.con }}</span>
  16. <el-checkbox-group
  17. v-model="item.AnswerList"
  18. class="checkbox-group"
  19. >
  20. <span v-for="(op, OPindex) in curQue.option" :key="OPindex">
  21. <el-radio
  22. v-if="curQue.type == 'matrixSingle'"
  23. v-model="item.Answer"
  24. :label="OPindex"
  25. >{{ op.con }}</el-radio
  26. >
  27. <el-checkbox
  28. v-else-if="curQue.type == 'matrixChekbox'"
  29. :label="OPindex"
  30. >{{ op.con }}</el-checkbox
  31. >
  32. </span>
  33. </el-checkbox-group>
  34. </div>
  35. </div>
  36. </template>
  37. <script>
  38. export default {
  39. components: {},
  40. props: ["curQue"],
  41. data() {
  42. return {};
  43. },
  44. computed: {},
  45. watch: {},
  46. //方法集合
  47. methods: {},
  48. //生命周期 - 创建完成(可以访问当前this实例)dsa
  49. created() {},
  50. //生命周期 - 挂载完成(可以访问DOM元素)
  51. mounted() {},
  52. beforeCreate() {}, //生命周期 - 创建之前
  53. beforeMount() {}, //生命周期 - 挂载之前
  54. beforeUpdate() {}, //生命周期 - 更新之前
  55. updated() {}, //生命周期 - 更新之后
  56. beforeDestroy() {}, //生命周期 - 销毁之前
  57. destroyed() {}, //生命周期 - 销毁完成
  58. activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
  59. };
  60. </script>
  61. <style lang='scss' scoped>
  62. //@import url(); 引入公共css类
  63. .Big-Book-prev-Textdes {
  64. > div {
  65. min-height: 56px;
  66. display: flex;
  67. align-items: center;
  68. .checkbox-group {
  69. > span {
  70. display: inline-block;
  71. width: 100px;
  72. text-align: center;
  73. }
  74. }
  75. > span {
  76. display: inline-block;
  77. width: 100px;
  78. text-align: center;
  79. }
  80. }
  81. .Big-Book-prev-list {
  82. > :nth-child(1) {
  83. word-break: break-all;
  84. }
  85. }
  86. }
  87. </style>