fix(接口定义): 修复场景变量相关问题
--bug=1016095 --user=王孝刚 【系统设置】工作空间 - 环境管理 - 创建环境页面,通用配置处,点击"高级设置"的相关问题 https://www.tapd.cn/55049933/s/1233087
This commit is contained in:
parent
7896d7bd8f
commit
e25f6164af
|
@ -1,6 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form :model="editData" label-position="right" label-width="80px" size="small" ref="form" :rules="rules">
|
<el-form :model="editData" label-position="right" label-width="80px" size="small" ref="form" :rules="rules"
|
||||||
|
:key="isActive">
|
||||||
<el-form-item :label="$t('api_test.variable_name')" prop="name">
|
<el-form-item :label="$t('api_test.variable_name')" prop="name">
|
||||||
<el-input v-model="editData.name" :placeholder="$t('api_test.variable_name')" ref="nameInput"/>
|
<el-input v-model="editData.name" :placeholder="$t('api_test.variable_name')" ref="nameInput"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -29,7 +30,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<ms-api-variable-advance ref="variableAdvance" :current-item="editData" @advancedRefresh="reload"/>
|
<ms-api-variable-advance ref="variableAdvance" :current-item.sync="editData" @advancedRefresh="reload"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -50,7 +51,8 @@
|
||||||
name: [
|
name: [
|
||||||
{required: true, message: this.$t('test_track.case.input_name'), trigger: 'blur'},
|
{required: true, message: this.$t('test_track.case.input_name'), trigger: 'blur'},
|
||||||
],
|
],
|
||||||
}
|
},
|
||||||
|
isActive: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
|
@ -60,8 +62,8 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
advanced(item) {
|
advanced(item) {
|
||||||
this.$refs.variableAdvance.open();
|
|
||||||
this.editData.value = item;
|
this.editData.value = item;
|
||||||
|
this.$refs.variableAdvance.open()
|
||||||
},
|
},
|
||||||
createFilter(queryString) {
|
createFilter(queryString) {
|
||||||
return (variable) => {
|
return (variable) => {
|
||||||
|
|
|
@ -250,7 +250,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addFunc() {
|
addFunc() {
|
||||||
if (this.itemValue.indexOf('@') == -1) {
|
if (this.currentTab === 0 && this.itemValue.indexOf('@') == -1) {
|
||||||
this.itemValue = '@' + this.itemValue;
|
this.itemValue = '@' + this.itemValue;
|
||||||
} else {
|
} else {
|
||||||
this.itemValue = this.itemValue;
|
this.itemValue = this.itemValue;
|
||||||
|
@ -277,7 +277,7 @@ export default {
|
||||||
this.mockVariableFuncs.push({name: '', params: []});
|
this.mockVariableFuncs.push({name: '', params: []});
|
||||||
},
|
},
|
||||||
saveAdvanced() {
|
saveAdvanced() {
|
||||||
if (this.itemValue && this.itemValue.indexOf('@') == -1) {
|
if (this.currentTab === 0 && this.itemValue && this.itemValue.indexOf('@') == -1) {
|
||||||
this.currentItem.value = '@' + this.itemValue;
|
this.currentItem.value = '@' + this.itemValue;
|
||||||
} else {
|
} else {
|
||||||
this.currentItem.value = this.itemValue;
|
this.currentItem.value = this.itemValue;
|
||||||
|
|
Loading…
Reference in New Issue