<template>
<view class="exam">
<pxing-exam :examlist="examlist" @getLastAnswer="submitTypeHandle"></pxing-exam>
</view>
</template>
<script>
import pxingExam from '@/components/pxing-exam/pxing-exam.vue';
export default {
data() {
return {
examlist:[
{
id:"1",
title:"今天的鸡腿是啥味道啊?",
type:0,
answer:"",
userAnswer:"",
answerList:[
{label:"A、咸味",value:"A"},
{label:"B、甜味",value:"B"},
{label:"C、辣味",value:"C"},
{label:"D、没吃出来",value:"D"}
]
},{
id:"2",
title:"鱼虾味道啊?",
type:0,
answer:"",
userAnswer:"",
answerList:[
{label:"A、咸味",value:"A"},
{label:"B、甜味",value:"B"},
{label:"C、辣味",value:"C"},
{label:"D、没吃出来",value:"D"}
]
}
]
}
},
methods:{
// getEveryAnswerHandle(e){ //获取当前题目的选择答案(题目题数发生改变时获取用户选择的答案,如果没有选择答案则不返回)
// console.log(e)
// },
submitTypeHandle(e){ //提交试卷时获取用户选择的所有答案
console.log("啊实打实的阿斯达按时")
}
},
components: {pxingExam}
}
</script>
<style lang="scss" scoped>
</style>
0 个回复