diff --git a/frontend/src/business/components/api/test/components/ApiScenarioVariables.vue b/frontend/src/business/components/api/test/components/ApiScenarioVariables.vue
index 6725d8fc30..236b3b2555 100644
--- a/frontend/src/business/components/api/test/components/ApiScenarioVariables.vue
+++ b/frontend/src/business/components/api/test/components/ApiScenarioVariables.vue
@@ -5,8 +5,8 @@
-
-
+
@@ -41,10 +41,6 @@
type: Boolean,
default: false
},
- isShowEnable: {
- type: Boolean,
- default: false
- },
showVariable: {
type: Boolean,
default: true
@@ -52,16 +48,10 @@
},
data() {
return {
- checkedValues: []
}
},
methods: {
remove: function (index) {
- if (this.isShowEnable) {
- // 移除勾选内容
- let checkIndex = this.checkedValues.indexOf(this.items[index].uuid);
- checkIndex != -1 ? this.checkedValues.splice(checkIndex, 1) : this.checkedValues;
- }
this.items.splice(index, 1);
this.$emit('change', this.items);
},
@@ -69,10 +59,6 @@
let isNeedCreate = true;
let removeIndex = -1;
this.items.forEach((item, index) => {
- // 启用行赋值
- if (this.isShowEnable) {
- item.enable = this.checkedValues.indexOf(item.uuid) != -1 ? true : false;
- }
if (!item.name && !item.value) {
// 多余的空行
if (index !== this.items.length - 1) {
@@ -83,20 +69,11 @@
}
});
if (isNeedCreate) {
- // 往后台送入的复选框值布尔值
- if (this.isShowEnable) {
- this.items[this.items.length - 1].enable = true;
- // v-model 选中状态
- this.checkedValues.push(this.items[this.items.length - 1].uuid);
- }
- this.items.push(new KeyValue());
+ this.items.push(new KeyValue({enable: true}));
}
this.$emit('change', this.items);
// TODO 检查key重复
},
- uuid: function () {
- return (((1 + Math.random()) * 0x100000) | 0).toString(16).substring(1);
- },
isDisable: function (index) {
return this.items.length - 1 === index;
}
@@ -104,15 +81,7 @@
created() {
if (this.items.length === 0) {
- this.items.push(new KeyValue());
- }else if (this.isShowEnable) {
- this.items.forEach((item, index) => {
- let uuid = this.uuid();
- item.uuid = uuid;
- if (item.enable) {
- this.checkedValues.push(uuid);
- }
- })
+ this.items.push(new KeyValue({enable: true}));
}
}
}
diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack
index cc38137a69..06d935cd1d 160000
--- a/frontend/src/business/components/xpack
+++ b/frontend/src/business/components/xpack
@@ -1 +1 @@
-Subproject commit cc38137a69a0f20fadece9c0f9f50a9468c4ace9
+Subproject commit 06d935cd1d22ab36f09763745c2aff8ad3fb08c1