提交 228edf51 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 96e1edc4
...@@ -85,9 +85,11 @@ export default { ...@@ -85,9 +85,11 @@ export default {
immediate: true, immediate: true,
handler(data) { handler(data) {
this.detail = data.paper this.detail = data.paper
if (!this.questions.length) {
this.questions = data.paper ? this.genQuestions(data.paper.examination) : [] this.questions = data.paper ? this.genQuestions(data.paper.examination) : []
} }
} }
}
}, },
computed: { computed: {
// 学期ID // 学期ID
......
...@@ -60,9 +60,11 @@ export default { ...@@ -60,9 +60,11 @@ export default {
chapter: { chapter: {
immediate: true, immediate: true,
handler(data) { handler(data) {
if (!this.questions.length) {
this.questions = data.homework ? this.genQuenstions(data.homework.questions) : [] this.questions = data.homework ? this.genQuenstions(data.homework.questions) : []
} }
} }
}
}, },
computed: { computed: {
// 学期ID // 学期ID
......
...@@ -116,9 +116,11 @@ export default { ...@@ -116,9 +116,11 @@ export default {
chapter: { chapter: {
immediate: true, immediate: true,
handler(data) { handler(data) {
if (!this.questions.length) {
this.questions = data.homework ? this.genQuenstions(data.homework.questions) : [] this.questions = data.homework ? this.genQuenstions(data.homework.questions) : []
} }
} }
}
}, },
computed: { computed: {
// 学期ID // 学期ID
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论