diff --git a/frontend/src/business/components/api/automation/scenario/variable/EditConstant.vue b/frontend/src/business/components/api/automation/scenario/variable/EditConstant.vue index be5c780a28..19e5b61a76 100644 --- a/frontend/src/business/components/api/automation/scenario/variable/EditConstant.vue +++ b/frontend/src/business/components/api/automation/scenario/variable/EditConstant.vue @@ -1,6 +1,7 @@ @@ -50,7 +51,8 @@ name: [ {required: true, message: this.$t('test_track.case.input_name'), trigger: 'blur'}, ], - } + }, + isActive: true } }, computed:{ @@ -60,8 +62,8 @@ }, methods: { advanced(item) { - this.$refs.variableAdvance.open(); this.editData.value = item; + this.$refs.variableAdvance.open() }, createFilter(queryString) { return (variable) => { diff --git a/frontend/src/business/components/api/test/components/environment/ApiVariableAdvance.vue b/frontend/src/business/components/api/test/components/environment/ApiVariableAdvance.vue index a84a840e95..144af92c53 100644 --- a/frontend/src/business/components/api/test/components/environment/ApiVariableAdvance.vue +++ b/frontend/src/business/components/api/test/components/environment/ApiVariableAdvance.vue @@ -250,7 +250,7 @@ export default { } }, addFunc() { - if (this.itemValue.indexOf('@') == -1) { + if (this.currentTab === 0 && this.itemValue.indexOf('@') == -1) { this.itemValue = '@' + this.itemValue; } else { this.itemValue = this.itemValue; @@ -277,7 +277,7 @@ export default { this.mockVariableFuncs.push({name: '', params: []}); }, saveAdvanced() { - if (this.itemValue && this.itemValue.indexOf('@') == -1) { + if (this.currentTab === 0 && this.itemValue && this.itemValue.indexOf('@') == -1) { this.currentItem.value = '@' + this.itemValue; } else { this.currentItem.value = this.itemValue;