fix(接口测试): csv上传后清空预览信息
--bug=1013355 --user=王孝刚 【接口测试】github#13766,场景变量里添加多个CVS时,预览页的信息没有及时清空 https://www.tapd.cn/55049933/s/1161591
This commit is contained in:
parent
16f6c419de
commit
3f902545d7
|
@ -124,16 +124,25 @@
|
|||
}
|
||||
this.loading = false;
|
||||
},
|
||||
cleanPreview() {
|
||||
this.allData = [];
|
||||
this.columns = [];
|
||||
this.previewData = [];
|
||||
},
|
||||
step(results, parser) {
|
||||
if(this.allData.length < 500) {
|
||||
if (this.allData.length < 500) {
|
||||
this.allData.push(results.data);
|
||||
}else{
|
||||
} else {
|
||||
this.showMessage = true;
|
||||
}
|
||||
},
|
||||
|
||||
handleClick() {
|
||||
let config = {complete: this.complete, step: this.step, delimiter: this.editData.delimiter ? this.editData.delimiter : ","};
|
||||
let config = {
|
||||
complete: this.complete,
|
||||
step: this.step,
|
||||
delimiter: this.editData.delimiter ? this.editData.delimiter : ","
|
||||
};
|
||||
this.allData = [];
|
||||
// 本地文件
|
||||
if (this.editData.files && this.editData.files.length > 0 && this.editData.files[0].file) {
|
||||
|
|
|
@ -368,6 +368,9 @@ export default {
|
|||
this.editData = {delimiter: ",", quotedData: 'false', files: []};
|
||||
this.editData.type = this.selectType;
|
||||
this.showDelete = false;
|
||||
if (this.editData.type === 'CSV') {
|
||||
this.$refs.csv.cleanPreview();
|
||||
}
|
||||
this.$refs.variableTable.cancelCurrentRow();
|
||||
},
|
||||
confirmVariable() {
|
||||
|
|
Loading…
Reference in New Issue