Procházet zdrojové kódy

试题样式修改

tanxue před 5 měsíci
rodič
revize
d61a5532ae

+ 29 - 4
common/styles/global/components.scss

@@ -107,7 +107,8 @@ $titleBar-tabBar-page: calc(100vh - var(--status-bar-height));
 /***** 试题---题干 *****/
 .ezy-shiti-question{
 	margin: 24rpx 0 42rpx;font-size: 32rpx;color: #333;line-height: 1.6;padding: 0 10rpx;box-sizing: border-box;
-	text-align: justify;word-wrap: break-word;word-break: break-all;display: block;@include ezy-rich-text;
+	text-align: justify;word-wrap: break-word;word-break: break-all;display: block;@include ezy-rich-text;
+	li{margin: 12rpx 0;}
 }
 /***** 单选题 *****/
 .ezy-danxuan-box{
@@ -139,11 +140,35 @@ $titleBar-tabBar-page: calc(100vh - var(--status-bar-height));
 		width: 100%;line-height:96rpx;border-radius: 8px;margin-bottom: 20rpx;
 		font-size: 32rpx;color: #333;box-sizing: border-box;padding: 10rpx 24rpx;
 	}
+	.uni-radio-input{
+		width: 56rpx;height: 56rpx;border: 0;@include ezy-no-repeat-cover();
+		background-image: url("@/static/images/exam/option-bj.png");}
 	.option-question{display: flex;}
-	.option-question.active .uni-radio-input{background-color: #0589e9!important;border-color: #0589e9!important;}
-	.option-question.showError .uni-radio-input{background-color: #ff5757!important;border-color: #ff5757!important;}
-	.option-question.active_right .uni-radio-input{background-color: #1ac136!important;border-color: #1ac136!important;}
+	.option-question.active .uni-radio-input{
+		background-image: url("@/static/images/exam/option-active-img.png");
+		background-color: transparent!important;
+		svg{display: none;}
+	}
+	.option-question.showError .uni-radio-input{
+		background-image: url("@/static/images/exam/option-error-img.png");
+		background-color: transparent!important;
+		svg{display: none;}
+	}
+	.option-question.active_right .uni-radio-input{
+		background-image: url("@/static/images/exam/option-right-img.png");
+		background-color: transparent!important;
+		svg{display: none;}
+	}
+}
+/***** 填空题 *****/
+.ezy-tiankong-box{
+	.tiankongn-title{
+		width: 231rpx;height: 63rpx;
+		background-image: url("@/static/images/exam/panduan-title.png");@include ezy-no-repeat-cover();
+	}
+	.tiankong-input {width: 50px;height: 32rpx;border: 1px solid #999;}
 }
+
 /***** 试题白色的框 *****/
 .shiti-frame-box{
 	flex: 1;width: 92%;height: auto;background-color: rgba(255, 255, 255, 0.6);border-radius: 10px;

+ 5 - 3
common/styles/global/pages.scss

@@ -595,9 +595,11 @@
 		.answer-title{width: 150rpx;height: 62rpx;flex-shrink: 0;margin-left: 10rpx;
 		background-image: url("@/static/images/exam/answer-title.png");@include ezy-no-repeat-cover;
 		}
-		.answer-btn-box{
-			display: flex;height: 135rpx;
-			margin: 20rpx 0 20rpx 10rpx;}
+		.tiankong-answer-content-box{background-color: rgba(255, 255, 255, 0.7);font-size: 32rpx;color: #15ab2e;
+		border-radius: 4px;box-sizing: border-box;padding: 16rpx;margin: 20rpx 0 20rpx 10rpx;min-height: 80rpx;}
+		.tiankong-answer-row{word-break: break-all;margin-bottom: 10rpx;}
+		.tiankong-answer-row:last-child{margin-bottom: 0;}
+		.answer-btn-box{display: flex;height: 135rpx;margin: 20rpx 0 20rpx 10rpx;}
 		.answer-item-left,.answer-item-right{
 			width: 100%;flex: 1;align-items: center;justify-content: center;
 			display: flex;flex-direction: column;background-color: rgba(255, 255, 255, 0.7);

+ 9 - 10
components/chengji/chengji.vue

@@ -34,16 +34,15 @@
 								</view>
 								<view  v-else>
 									<!-- 答案 -->
-									<view >
-										<text class="answer-item-title">正确答案</text>
-										<view v-for="(ict,cindex) in showAnswerResult(item)" :key="cindex">
-                      <text>{{cindex+1}}</text>
-                      <text v-for="(xItem,xindex) in ict" :key="xindex">
-                        <text > {{xItem}} </text>
-                        <text v-if="xindex != ict.length-1">/</text>
-                      </text>
-
-                    </view>
+									<view class="tiankong-answer-content-box">
+										<!-- <text class="answer-item-title">正确答案</text> -->
+										<view v-for="(ict,cindex) in showAnswerResult(item)" :key="cindex" class="tiankong-answer-row">
+										  <text>{{cindex+1}}. </text>
+										  <text v-for="(xItem,xindex) in ict" :key="xindex">
+											<text > {{xItem}} </text>
+											<text v-if="xindex != ict.length-1">/</text>
+										  </text>
+										</view>
 									</view>
 								</view>
 								

+ 4 - 31
components/question/tiankong.vue

@@ -1,7 +1,9 @@
 <template>
-	<view class="fill-in-the-blank">
+	<view class="ezy-tiankong-box">
+		<!-- 标题区域 -->
+		<view class="tiankongn-title"></view>
 		<!-- 显示填空后的文本 -->
-		<view class="formatted-text" v-html="formattedText" :question="question" :myflag="myflag"
+		<view class="ezy-shiti-question" v-html="formattedText" :question="question" :myflag="myflag"
 			:change:myflag="TK.updateFlag" :change:question="TK.watchQuestionChange"></view>
 		<!-- 提供与占位符数量相匹配的输入框 -->
 		<template v-for="(placeholder, index) in placeholders" :key="index">
@@ -124,32 +126,3 @@
 	}
 </script>
 
-<style scoped>
-	.fill-in-the-blank {
-		width: 100%;
-	}
-
-	.formatted-text {
-		margin-bottom: 10px;
-		font-size: 16px;
-		line-height: 1.5;
-	}
-
-	.inputs-container {
-		display: flex;
-		flex-wrap: wrap;
-		gap: 10px;
-	}
-
-	.input-box {
-		padding: 5px;
-		width: 150px;
-		/* 可根据需要调整宽度 */
-		border: 1px solid #ccc;
-		border-radius: 4px;
-	}
-
-	.tiankong-input {
-		width: 50px;
-	}
-</style>