断点上传(未完)
思路 对文件进行切片 将切片传输给服务器 < template > < div class = "home" > < input type = "file" @change = "handleFileChange" / > < el - button @click = "handleUpload" > 上传 < / el - button > < / div > < / template > < script > // @ is an alias to /src const LENGTH = 10 ; import HelloWorld from '@/components/HelloWorld.vue' export default { name : 'home' , data ( ) { return { file : null , data : [ ] } } , methods : { request ( ) { } , async handleFileChange ( e , length = LENGTH ) { const [ file ] = e . target . files ; if ( ! file ) return ; this . file = file ; } , // 生成文件切片 createFileChunk ( file , length =