|
@@ -98,6 +98,8 @@
|
|
|
<SingleModule
|
|
|
:curQueItem="item"
|
|
|
:index="index"
|
|
|
+ :toIndex="toIndex"
|
|
|
+
|
|
|
:changAnswer="changAnswer"
|
|
|
:deleteOptionOne="deleteOptionOne"
|
|
|
:type="type"
|
|
@@ -347,12 +349,12 @@ export default {
|
|
|
this.curQue.splice(index, 1);
|
|
|
},
|
|
|
// 删除其中一个选项
|
|
|
- deleteOptionOne(index) {
|
|
|
- if (this.curQue.option.length <= 2) {
|
|
|
+ deleteOptionOne(index, toIndex) {
|
|
|
+ if (this.curQue[toIndex].option.length <= 2) {
|
|
|
this.$message.warning("至少要保留两个选项");
|
|
|
return;
|
|
|
}
|
|
|
- this.curQue.option.splice(index, 1);
|
|
|
+ this.curQue[toIndex].option.splice(index, 1);
|
|
|
},
|
|
|
// 添加一个题
|
|
|
addtopic() {
|