Commit 98d410d9 authored by 罗超's avatar 罗超

修改

parent 224c17b0
...@@ -73,8 +73,23 @@ ...@@ -73,8 +73,23 @@
methods: { methods: {
//删除选项 //删除选项
deleteOpion(index) { deleteOpion(index) {
this.data.splice(index, 1); this.$q.dialog({
this.calcOptionTitle(); title: "删除小题",
message: "确实要删除该选项吗?",
persistent: true,
cancel: {
label: "取消",
flat: true
},
ok: {
label: "确认",
flat: true,
focus: true
}
}).onOk(() => {
this.data.splice(index, 1);
this.commonIndex=-1;
});
}, },
//新增选项 //新增选项
addOption() { addOption() {
......
...@@ -76,8 +76,18 @@ ...@@ -76,8 +76,18 @@
methods: { methods: {
//删除选项 //删除选项
deleteOpion(index) { deleteOpion(index) {
this.data.splice(index, 1); this.$q.dialog({
this.calcOptionTitle(); title: '提示信息',
message: '是否确定删除?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
this.data.splice(index, 1);
}).onCancel(() => {
});
}, },
//新增选项 //新增选项
addOption() { addOption() {
......
...@@ -72,8 +72,20 @@ ...@@ -72,8 +72,20 @@
}, },
//删除选项 //删除选项
deleteOpion(index) { deleteOpion(index) {
this.data.splice(index, 1); this.$q.dialog({
this.calcOptionTitle(); title: '提示信息',
message: '是否确定删除?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
this.data.splice(index, 1);
this.commonIndex=-1;
this.calcOptionTitle();
}).onCancel(() => {
});
}, },
//新增选项 //新增选项
addOption() { addOption() {
......
...@@ -72,8 +72,20 @@ ...@@ -72,8 +72,20 @@
}, },
//删除选项 //删除选项
deleteOpion(index) { deleteOpion(index) {
this.data.splice(index, 1); this.$q.dialog({
this.calcOptionTitle(); title: '提示信息',
message: '是否确定删除?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
this.data.splice(index, 1);
this.commonIndex=-1;
this.calcOptionTitle();
}).onCancel(() => {
});
}, },
//新增选项 //新增选项
addOption() { addOption() {
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
clickIndex:-1, clickIndex:-1,
}; };
}, },
created() { created() {
this.initConfig(); this.initConfig();
}, },
methods: { methods: {
...@@ -106,9 +106,25 @@ ...@@ -106,9 +106,25 @@
}, },
//删除选项 //删除选项
deleteOpion(index) { deleteOpion(index) {
this.data[0].splice(index, 1); this.$q.dialog({
this.data[1].splice(index, 1); title: "删除小题",
this.calcOptionTitle(); message: "确实要删除该选项吗?",
persistent: true,
cancel: {
label: "取消",
flat: true
},
ok: {
label: "确认",
flat: true,
focus: true
}
}).onOk(() => {
this.data[0].splice(index, 1);
this.data[1].splice(index, 1);
this.commonIndex=-1;
this.calcOptionTitle();
});
}, },
//新增选项 //新增选项
addOption() { addOption() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment