feat: There is no way the, 上传文件组件多个拆分符号问题

This commit is contained in:
super_liu
2022-04-01 11:37:29 +08:00
parent 0441ba3dc8
commit a9e56d0410
+2 -2
View File
@@ -245,7 +245,7 @@ export default {
if (this.value != null && this.value !== '') {
let paramefile = this.value
if (paramefile.charAt(paramefile.length - 1) === ',') {
paramefile = paramefile.substring(0, paramefile.length - 1)
paramefile = paramefile.substring(0, paramefile.length - 1).replaceAll(",,",",")
}
this.$http.get('att/attFile/getMultiFileInfos', {
fileIds: paramefile
@@ -272,7 +272,7 @@ export default {
obj.response.data = file.response.data
this.showFileList.push(obj)
// this.value += res.data.id + ','
this.$emit('input', this.value ? this.value + ','+ res.data.id + ',' : this.value+ res.data.id + ',')
this.$emit('input', this.value ? (this.value + ','+ res.data.id + ',').replaceAll(",,",',') : (this.value+ res.data.id + ',').replaceAll(',,',','))
this.$emit('success')
this.$message({
message: '文件上传成功',