fix(接口测试): 修复接口自动化场景变量删除文件页面报错问题

--user=郭雨琦 修复接口自动化场景变量删除文件页面报错问题
This commit is contained in:
guoyuqi 2022-02-16 16:14:59 +08:00 committed by xiaomeinvG
parent 8253ef9608
commit 433c62acff
1 changed files with 2 additions and 2 deletions

View File

@ -72,13 +72,13 @@ export default {
} }
}, },
handleRemove(file) { handleRemove(file) {
this.$alert('是否确认删除CSV文件【 ' + file.file ? file.file.name : file.name + " 】?", '', { let fileName = file.file ? file.file.name : file.name
this.$alert('是否确认删除CSV文件【 ' + fileName + " 】?", '', {
confirmButtonText: this.$t('commons.confirm'), confirmButtonText: this.$t('commons.confirm'),
callback: (action) => { callback: (action) => {
if (action === 'confirm') { if (action === 'confirm') {
this.$refs.upload.handleRemove(file); this.$refs.upload.handleRemove(file);
for (let i = 0; i < this.parameter.files.length; i++) { for (let i = 0; i < this.parameter.files.length; i++) {
let fileName = file.file ? file.file.name : file.name;
let paramFileName = this.parameter.files[i].file ? let paramFileName = this.parameter.files[i].file ?
this.parameter.files[i].file.name : this.parameter.files[i].name; this.parameter.files[i].file.name : this.parameter.files[i].name;
if (fileName === paramFileName) { if (fileName === paramFileName) {