wot-design icon indicating copy to clipboard operation
wot-design copied to clipboard

文件上传前无法修改文件名

Open louxu623 opened this issue 1 year ago • 0 comments

文件上传组件: <wd-upload v-model="planForm.fileList" multiple :limit="3" :before-upload="imgBeforeUpload" @exceed="imgUploadLimit" @success="imgUploadSuccess" @remove="imgRemoveSuccess" :action="uploadUrl">

上传文件之前的钩子: imgBeforeUpload ({ files, fileList, resolve }) { for (let i = 0; i < files.length; i++) { console.log(files[i].name); let suffix = files[i].name.substring(files[i].name.lastIndexOf(".")); //.txt files[i].name = 'dispatch-' + this.generateUniqueString() + suffix console.log(customFile.name) } resolve(true) },

以上,文件名修改不生效,各种方法都尝试过了。麻烦帮忙看看是啥原因哦,感谢!

louxu623 avatar Sep 01 '23 10:09 louxu623