提交 14c0ca3a authored 作者: 王鹏飞's avatar 王鹏飞

fix: 修改课后考试试题序号

上级 182737e9
......@@ -15,10 +15,10 @@
<!-- 考试试题 -->
<div class="exam-form" v-else>
<el-form :disabled="isSubmited">
<template v-for="items in questions">
<template v-for="(items, i) in questions">
<exam-item
v-for="(item, index) in items"
:index="index"
:index="getIndex(i, index)"
:type="item.type"
:data="item"
:value="item.formModel"
......@@ -282,6 +282,13 @@ export default {
.finally(() => {
this.submitLoading = false
})
},
getIndex(parentIndex, index) {
while (parentIndex > 0) {
index = index + this.questions[parentIndex - 1].length
parentIndex--
}
return index
}
},
beforeMount() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论