fix_【接口定义】-添加mock函数时值生成优化+页面翻译“return” --bug=1007811 --user=王孝刚 【接口定义】-添加mock函数时值生成优化+页面翻译“return” https://www.tapd.cn/55049933/s/1066643

This commit is contained in:
wxg0103 2021-11-12 14:29:44 +08:00 committed by 刘瑞斌
parent 925469e484
commit 442a31b131
2 changed files with 12 additions and 2 deletions

View File

@ -91,7 +91,8 @@
<ms-api-variable-advance ref="variableAdvance" :environment="environment" :scenario="scenario"
:append-to-body="appendDialogToBody"
:parameters="parameters"
:current-item="currentItem"/>
:current-item="currentItem"
@advancedRefresh="reload"/>
<ms-api-variable-json :append-to-body="appendDialogToBody" ref="variableJson" @callback="callback"/>
<api-variable-setting :append-to-body="appendDialogToBody"

View File

@ -251,6 +251,11 @@
this.showPreview();
},
addFunc() {
if(this.itemValue.indexOf('@') == -1){
this.itemValue = '@' + this.itemValue;
} else {
this.itemValue = this.itemValue;
}
if (this.mockVariableFuncs.length > 4) {
this.$info(this.$t('api_test.request.parameters_advance_add_func_limit'));
return;
@ -273,7 +278,11 @@
this.mockVariableFuncs.push({name: '', params: []});
},
saveAdvanced() {
if(this.itemValue.indexOf('@') == -1){
this.currentItem.value = '@' + this.itemValue;
} else {
this.currentItem.value = this.itemValue;
}
this.itemValueVisible = false;
this.mockVariableFuncs = [];
this.$emit('advancedRefresh', this.itemValue);