fix(接口自动化): 删除场景变量,右侧信息没同步删除

This commit is contained in:
fit2-zhao 2021-04-21 16:30:01 +08:00 committed by fit2-zhao
parent ae7e57bc4a
commit de7067b68b
6 changed files with 44 additions and 7 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<el-form :model="editData" label-position="right" label-width="80px" size="small" ref="form"> <el-form :model="editData" label-position="right" label-width="80px" size="small" ref="form" :rules="rules">
<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> <el-input v-model="editData.name" :placeholder="$t('api_test.variable_name')" ref="nameInput"></el-input>
</el-form-item> </el-form-item>
@ -42,6 +42,15 @@
props: { props: {
editData: {}, editData: {},
}, },
data() {
return {
rules: {
name: [
{required: true, message: this.$t('test_track.case.input_name'), trigger: 'blur'},
],
},
}
},
methods: { methods: {
advanced() { advanced() {
this.$refs.variableAdvance.open(); this.$refs.variableAdvance.open();

View File

@ -1,5 +1,5 @@
<template> <template>
<el-form :model="editData" label-position="right" label-width="80px" size="small" ref="form2"> <el-form :model="editData" label-position="right" label-width="80px" size="small" ref="form2" :rules="rules">
<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')"></el-input> <el-input v-model="editData.name" :placeholder="$t('api_test.variable_name')"></el-input>
</el-form-item> </el-form-item>
@ -34,6 +34,15 @@
props: { props: {
editData: {}, editData: {},
}, },
data() {
return {
rules: {
name: [
{required: true, message: this.$t('test_track.case.input_name'), trigger: 'blur'},
],
},
}
},
} }
</script> </script>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-form :model="editData" label-position="right" label-width="80px" size="small" ref="form3"> <el-form :model="editData" label-position="right" label-width="80px" size="small" ref="form3" :rules="rules">
<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')"></el-input> <el-input v-model="editData.name" :placeholder="$t('api_test.variable_name')"></el-input>
</el-form-item> </el-form-item>
@ -85,9 +85,9 @@
previewData: [], previewData: [],
columns: [], columns: [],
allDatas: [], allDatas: [],
rule: { rules: {
name: [ name: [
{required: true, message: this.$t('api_test.variable_name'), trigger: 'blur'}, {required: true, message: this.$t('test_track.case.input_name'), trigger: 'blur'},
], ],
}, },
} }

View File

@ -1,5 +1,5 @@
<template> <template>
<el-form :model="editData" label-position="right" label-width="80px" size="small" ref="form4"> <el-form :model="editData" label-position="right" label-width="80px" size="small" ref="form4" :rules="rules">
<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')"></el-input> <el-input v-model="editData.name" :placeholder="$t('api_test.variable_name')"></el-input>
</el-form-item> </el-form-item>
@ -25,6 +25,15 @@
props: { props: {
editData: {}, editData: {},
}, },
data() {
return {
rules: {
name: [
{required: true, message: this.$t('test_track.case.input_name'), trigger: 'blur'},
],
},
}
},
} }
</script> </script>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-form :model="editData" label-position="right" label-width="80px" size="small" ref="form5"> <el-form :model="editData" label-position="right" label-width="80px" size="small" ref="form5" :rules="rules">
<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')"></el-input> <el-input v-model="editData.name" :placeholder="$t('api_test.variable_name')"></el-input>
</el-form-item> </el-form-item>
@ -32,6 +32,15 @@
props: { props: {
editData: {}, editData: {},
}, },
data() {
return {
rules: {
name: [
{required: true, message: this.$t('test_track.case.input_name'), trigger: 'blur'},
],
},
}
},
} }
</script> </script>

View File

@ -262,6 +262,7 @@
this.variables.splice(index, 1); this.variables.splice(index, 1);
}) })
this.selection = []; this.selection = [];
this.editData = {type: "CONSTANT"};
}, },
filter() { filter() {
let datas = []; let datas = [];