<template>
	<div :style="{backgroundColor:StandardAnswer == null?'':'#F2F6FC'}" style="padding: 20px;">
		<div style="font-size: 16px;">
			<span>{{(index+1)+". "}}{{getContent.TestContent}}</span><span style="color: #F56C6C;">（{{getContent.TestMark
}}分）</span>
		</div>
		<div style="padding-left: 20px;margin-top:20px">
			<div style="display: flex;align-items: center;margin-bottom: 18px;" v-for="(v,i) in getContent.OptionContent
" :key="v">
				<!-- <el-radio v-model="StandardAnswer" :label="abc[i]"> -->
				<el-checkbox v-model="checks[i]" :key="i"  @change="chooseDa(i,$event)">
				<!-- <el-checkbox v-model="checks[i]"  > -->
					<span style="font-weight: bold;font-size: 16px;">
						{{abc[i]+". "}}
					</span>
					<span style="font-size: 16px;">
						{{v}}
					</span>
				</el-checkbox> 
			</div>
		</div>
		<div style="color: #0000FF;margin-top: 20px;" v-if="show">
			标准答案：{{getContent.StandardAnswer}}
		</div>
	</div>
</template>

<script>
	export default {
		name:"Duoxuan",
		props: {
			content: { // 传入的地址
				type: Object,
				default:null,
			},
			index:{
				type:Number,
				default:null,
			},
			show:{
				type:Boolean,
				default:true
			}
		},
		data() {
			return {
				abc:["A","B","C","D","E","F"],
				StandardAnswer:null,
				checks:[]
			};
		},
		computed: {
			getContent(){
				this.content.OptionContent = this.content.OptionContent.split("|")
				// for(let i in this.content.OptionContent){
				// 	this.checks.push(true)
				// } 
				return this.content
			}
		},
		mounted() {
			for(let i in this.content.OptionContent){
				this.checks.push(false)
			} 
		},
		methods: {
			chooseDa(v,e){
				this.checks[v] = e
			}
		},
	};
</script>

<style>
</style>