소스 검색

错题调整

wangxy 5 달 전
부모
커밋
f0a9009eda
2개의 변경된 파일13개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      components/question/panduan.vue
  2. 11 0
      components/question/tiankong.vue

+ 2 - 2
components/question/panduan.vue

@@ -7,11 +7,11 @@
 		<!-- 选项区域 -->
 		<radio-group @change="radioChange" class="danxuan-option-box">
 			<label class="option-question" :class="formatClass('1')">
-				<radio value="1" :checked="question.reply == '1'"/>
+				<radio value="1" :disabled="showError" :checked="question.reply == '1'"/>
 				<view>正确</view>
 			</label>
 			<label class="option-question" :class="formatClass('0')"> 
-				<radio value="0" :checked="question.reply == '0'"/>
+				<radio value="0" :disabled="showError" :checked="question.reply == '0'"/>
 				<view>错误</view>
 			</label>
 		</radio-group>

+ 11 - 0
components/question/tiankong.vue

@@ -92,6 +92,12 @@
 
 <script module="TK" lang="renderjs">
 	export default {
+		props: {
+			showError: {
+				type: Boolean,
+				default: false
+			}
+		},
 		data() {
 			return {
 				myQ: null
@@ -117,6 +123,11 @@
 				if (!question) {
 					return;
 				}
+				
+				if (this.showError) {
+					return;
+				}
+				
 				question.result.forEach((item, index) => {
 					const dom = document.getElementById(`t_${question.stId}_${index}`)
 					dom && dom.addEventListener('focus', (e) => this.updateFn(e))