parent
4b703355c7
commit
c4ed4d768a
|
@ -71,11 +71,14 @@ export default {
|
|||
this.currentScenario[this.prop] = this.innerTags;
|
||||
},
|
||||
'currentScenario.tags'() {
|
||||
if(Object.prototype.toString.call(this.currentScenario.tags)==="[object String]"){
|
||||
this.innerTags = JSON.parse(this.currentScenario.tags);
|
||||
}else{
|
||||
this.innerTags = this.currentScenario.tags
|
||||
if(this.prop==='tags'){
|
||||
if(!this.currentScenario[this.prop]||this.currentScenario[this.prop]===''||this.currentScenario[this.prop].length===0){
|
||||
if(this.innerTags.length!==0){
|
||||
this.innerTags=[];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -251,7 +251,7 @@ export default {
|
|||
},
|
||||
saveApi(data) {
|
||||
this.$emit("saveApi", data);
|
||||
if (data != null && data.tags != 'null' && data.tags != undefined) {
|
||||
if (data != null && data.tags !== 'null' && data.tags !== undefined) {
|
||||
if (Object.prototype.toString.call(data.tags)==="[object String]") {
|
||||
data.tags = JSON.parse(data.tags);
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
<div v-if="oldApiProtocol==='TCP'">
|
||||
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
||||
|
||||
<ms-tcp-format-parameters :show-script="false" :request="oldRequest" :is-read-only="true" ref="tcpFormatParameter"/>
|
||||
<ms-tcp-format-parameters :show-script="false" :request="oldRequest" ref="tcpFormatParameter"/>
|
||||
</div>
|
||||
<div v-else-if="oldApiProtocol==='ESB'">
|
||||
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
||||
|
@ -132,7 +132,7 @@
|
|||
<!-- 请求参数 -->
|
||||
<div v-if="apiProtocol=='TCP'">
|
||||
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
||||
<ms-tcp-format-parameters :show-script="false" :request="request" :is-read-only="true" ref="tcpFormatParameter"/>
|
||||
<ms-tcp-format-parameters :show-script="false" :request="request" ref="tcpFormatParameter"/>
|
||||
</div>
|
||||
<div v-else-if="apiProtocol=='ESB'">
|
||||
<p class="tip">{{ $t('api_test.definition.request.req_param') }} </p>
|
||||
|
|
Loading…
Reference in New Issue