From 5827e27f1f584471c68610fa898e4ff4c6720500 Mon Sep 17 00:00:00 2001 From: qin_jun_yan Date: Tue, 14 Jul 2020 17:39:44 +0800 Subject: [PATCH] Judgment that the use of the includes method is incorrect and the index cannot be obtained --- .../ui/src/views/train-manage/model-traceback.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mindinsight/ui/src/views/train-manage/model-traceback.vue b/mindinsight/ui/src/views/train-manage/model-traceback.vue index e6f7984d..61bcf8e8 100644 --- a/mindinsight/ui/src/views/train-manage/model-traceback.vue +++ b/mindinsight/ui/src/views/train-manage/model-traceback.vue @@ -1167,16 +1167,16 @@ export default { return val[i] || val[i] === 0; }); if (!flag) { - let haveItem = this.table.optionsNotInCheckbox.includes(i); - if (haveItem) { + let index = this.table.optionsNotInCheckbox.indexOf(i); + if (index >= 0) { this.table.optionsNotInCheckbox.splice(index, 1); } - haveItem = this.table.optionsNotInEchart.includes(i); - if (haveItem) { + index = this.table.optionsNotInEchart.indexOf(i); + if (index >= 0) { this.table.optionsNotInEchart.splice(index, 1); } - haveItem = this.table.optionsNotInTable.includes(i); - if (haveItem) { + index = this.table.optionsNotInTable.indexOf(i); + if (index >= 0) { this.table.optionsNotInTable.splice(index, 1); }