feat: There is no way the, 上传文件组件多个拆分符号问题
This commit is contained in:
@@ -245,7 +245,7 @@ export default {
|
|||||||
if (this.value != null && this.value !== '') {
|
if (this.value != null && this.value !== '') {
|
||||||
let paramefile = this.value
|
let paramefile = this.value
|
||||||
if (paramefile.charAt(paramefile.length - 1) === ',') {
|
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', {
|
this.$http.get('att/attFile/getMultiFileInfos', {
|
||||||
fileIds: paramefile
|
fileIds: paramefile
|
||||||
@@ -272,7 +272,7 @@ export default {
|
|||||||
obj.response.data = file.response.data
|
obj.response.data = file.response.data
|
||||||
this.showFileList.push(obj)
|
this.showFileList.push(obj)
|
||||||
// this.value += res.data.id + ','
|
// 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.$emit('success')
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '文件上传成功',
|
message: '文件上传成功',
|
||||||
|
|||||||
Reference in New Issue
Block a user