|
|
@@ -55,7 +55,9 @@ export default {
|
|
|
watch: {
|
|
|
value: {
|
|
|
deep: true,
|
|
|
- handler: nextValue => this.$emit('input', nextValue)
|
|
|
+ handler(nextValue) {
|
|
|
+ return this.$emit('input', nextValue)
|
|
|
+ }
|
|
|
},
|
|
|
initValue: {
|
|
|
deep: true,
|
|
|
@@ -67,9 +69,8 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
handleSubmit() {
|
|
|
- const { stem, options, answer, analysis } = this.value
|
|
|
+ const { stem, answer, analysis } = this.value
|
|
|
if (!stem) this.$setErrorMessage('请输入题干')
|
|
|
- else if (!options?.A) this.$setErrorMessage('请输入选项')
|
|
|
else if (!answer) this.$setErrorMessage('请选择答案')
|
|
|
else if (!analysis) this.$setErrorMessage('请输入解析')
|
|
|
else this.$emit('submit', this.value)
|