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>
|
||||
<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-input v-model="editData.name" :placeholder="$t('api_test.variable_name')" ref="nameInput"/>
|
||||
</el-form-item>
|
||||
|
@ -29,7 +30,7 @@
|
|||
</el-col>
|
||||
</el-form-item>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
|
@ -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) => {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue