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

修改

parent 224c17b0
......@@ -73,8 +73,23 @@
methods: {
//删除选项
deleteOpion(index) {
this.data.splice(index, 1);
this.calcOptionTitle();
this.$q.dialog({
title: "删除小题",
message: "确实要删除该选项吗?",
persistent: true,
cancel: {
label: "取消",
flat: true
},
ok: {
label: "确认",
flat: true,
focus: true
}
}).onOk(() => {
this.data.splice(index, 1);
this.commonIndex=-1;
});
},
//新增选项
addOption() {
......
......@@ -76,8 +76,18 @@
methods: {
//删除选项
deleteOpion(index) {
this.data.splice(index, 1);
this.calcOptionTitle();
this.$q.dialog({
title: '提示信息',
message: '是否确定删除?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
this.data.splice(index, 1);
}).onCancel(() => {
});
},
//新增选项
addOption() {
......
......@@ -72,8 +72,20 @@
},
//删除选项
deleteOpion(index) {
this.data.splice(index, 1);
this.calcOptionTitle();
this.$q.dialog({
title: '提示信息',
message: '是否确定删除?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
this.data.splice(index, 1);
this.commonIndex=-1;
this.calcOptionTitle();
}).onCancel(() => {
});
},
//新增选项
addOption() {
......
......@@ -72,8 +72,20 @@
},
//删除选项
deleteOpion(index) {
this.data.splice(index, 1);
this.calcOptionTitle();
this.$q.dialog({
title: '提示信息',
message: '是否确定删除?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
this.data.splice(index, 1);
this.commonIndex=-1;
this.calcOptionTitle();
}).onCancel(() => {
});
},
//新增选项
addOption() {
......
......@@ -97,7 +97,7 @@
clickIndex:-1,
};
},
created() {
created() {
this.initConfig();
},
methods: {
......@@ -106,9 +106,25 @@
},
//删除选项
deleteOpion(index) {
this.data[0].splice(index, 1);
this.data[1].splice(index, 1);
this.calcOptionTitle();
this.$q.dialog({
title: "删除小题",
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() {
......
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