fix(接口自动化): 修复添加断言规则,会多出一个响应时间断言栏

This commit is contained in:
fit2-zhao 2021-03-08 14:20:29 +08:00
parent 9b6281d4cc
commit 78b30352af
3 changed files with 3 additions and 5 deletions

View File

@ -22,7 +22,7 @@
props: {
value: [Number, String],
duration:{},
duration: {},
edit: Boolean,
callback: Function,
isReadOnly: {
@ -51,7 +51,7 @@
this.$emit('input', value);
},
validate() {
if (Number(this.value) < 0 || this.value=='') {
if (this.value == '' || Number(this.value) <= 0) {
this.$error(this.$t('commons.formatErr'));
return false;
}

View File

@ -82,7 +82,7 @@
computed: {
isShow() {
let rt = this.assertions.duration;
return rt.value !== undefined;
return rt.value !== undefined && rt.value !== 0;
}
},
watch: {

View File

@ -202,8 +202,6 @@ export default {
let bodyFiles = this.getBodyUploadFiles();
this.api.method = this.api.request.method;
this.api.path = this.api.request.path;
console.log(this.api)
console.log(typeof (bodyFiles))
this.$fileUpload(url, null, bodyFiles, this.api, () => {
this.$success(this.$t('commons.save_success'));
this.$emit('saveApi', this.api);