xingyy
xingyy 1 year ago
parent 5f6198ca6d
commit 876ad6ab8e

@ -260,18 +260,19 @@ export default {
async afterRead(event) { async afterRead(event) {
// multiple true , file // multiple true , file
let lists = [].concat(event.file) let lists = [].concat(event.file)
let fileListLen = this[`fileList${event.name}`].length let fileListLen = this[`fileList`].length
lists.map((item) => { lists.map((item) => {
this[`fileList${event.name}`].push({ this[`fileList`].push({
...item, ...item,
status: 'uploading', status: 'uploading',
message: '上传中' message: '上传中'
}) })
}) })
for (let i = 0; i < lists.length; i++) { for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url) const result = await this.uploadFilePromise(lists[i].url, 'check')
let item = this[`fileList${event.name}`][fileListLen] console.log(result)
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, { let item = this[`fileList`][fileListLen]
this[`fileList`].splice(fileListLen, 1, Object.assign(item, {
status: 'success', status: 'success',
message: '', message: '',
url: result url: result

Loading…
Cancel
Save