| | |
| | | code: 100, |
| | | msg: '', |
| | | data: { |
| | | path: '上传文件成功' |
| | | imgUrl: '上传文件成功' |
| | | } |
| | | } |
| | | }, (inf) => { |
| | | // 替换掉未上传的文件 |
| | | this.$emit('change', [{ name: '文件' + this.extname(inf.path), url: inf.path, status: 'success' }]) |
| | | this.$emit('change', [{ name: '文件' + this.extname(inf.imgUrl), url: inf.imgUrl, status: 'success' }]) |
| | | |
| | | console.log('上传文件成功且结束') |
| | | |
| | | // 提交 |
| | | // this.$set(this.dialogData, 'path', inf.path) |
| | | this.callback && this.callback(inf.path) |
| | | // this.$set(this.dialogData, 'imgUrl', inf.imgUrl) |
| | | this.callback && this.callback(inf.imgUrl) |
| | | }) |
| | | }, |
| | | // 获取文件后缀名 |
| | |
| | | code: 100, |
| | | msg: '', |
| | | data: { |
| | | // path: 'https://music.163.com/song/media/outer/url?id=1805088448.mp3' |
| | | path: 'https://www.w3school.com.cn/i/movie.mp4' |
| | | // imgUrl: 'https://music.163.com/song/media/outer/url?id=1805088448.mp3' |
| | | imgUrl: 'https://www.w3school.com.cn/i/movie.mp4' |
| | | } |
| | | } |
| | | }, (inf) => { |
| | | // 替换掉未上传的图片 |
| | | this.$emit('change', [{ name: '素材', url: inf.path, status: 'success' }]) |
| | | this.$emit('change', [{ name: '素材', url: inf.imgUrl, status: 'success' }]) |
| | | |
| | | console.log('上传文件成功且结束') |
| | | |
| | | // 提交 |
| | | // this.$set(this.dialogData, 'imgUrl', inf.imgUrl) |
| | | this.callback && this.callback(inf.path) |
| | | this.callback && this.callback(inf.imgUrl) |
| | | }) |
| | | } |
| | | // 上传文件 ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ |