oss 优化分片上传
This commit is contained in:
parent
497c76743b
commit
9b921836da
@ -20,6 +20,16 @@
|
||||
<svg-icon v-if="grid" class="mobile grid icon-share" icon-class="share"/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="item.ossFolder && !public">
|
||||
<div v-if="pc">
|
||||
<el-tag v-if="!grid" size="small" class="pc list oss-folder">{{ item.ossPlatform }}</el-tag>
|
||||
<el-tag v-if="grid" size="small" class="pc grid oss-folder">{{ item.ossPlatform }}</el-tag>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-tag v-if="!grid" size="small" class="mobile list oss-folder">{{ item.ossPlatform }}</el-tag>
|
||||
<el-tag v-if="grid" size="small" class="mobile grid oss-folder">{{ item.ossPlatform }}</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
<svg-icon v-if="item.isFolder" icon-class="folder"/>
|
||||
<svg-icon v-else-if="item.contentType.indexOf('video') > -1" icon-class="video"/>
|
||||
<div v-else-if="item.contentType.indexOf('audio') > -1" v-on:mousedown="noDrag($event)">
|
||||
@ -185,4 +195,34 @@ export default {
|
||||
font-size: 0.5rem;
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
.oss-folder {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.oss-folder {
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.pc.grid.oss-folder {
|
||||
height: 12px;
|
||||
padding: 0 2px;
|
||||
line-height: 12px;
|
||||
}
|
||||
|
||||
.mobile.list.oss-folder {
|
||||
left: 85%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.mobile.grid.oss-folder {
|
||||
top: 40%;
|
||||
height: 12px;
|
||||
padding: 0 2px;
|
||||
line-height: 12px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@ -146,6 +146,7 @@ export default {
|
||||
shareId: this.shareId,
|
||||
fileId: this.file.id,
|
||||
id: this.file.id,
|
||||
fileName: this.file.name,
|
||||
path: encodeURI(this.file.path),
|
||||
username: this.$store.state.user.name
|
||||
}).then((res) => {
|
||||
|
||||
@ -2095,6 +2095,7 @@ export default {
|
||||
this.beforeLoadData(onLoad)
|
||||
api.fileList({
|
||||
userId: this.$store.state.user.userId,
|
||||
username: this.$store.state.user.name,
|
||||
currentDirectory: encodeURI(this.$route.query.path),
|
||||
pageIndex: this.pagination.pageIndex,
|
||||
pageSize: this.pagination.pageSize
|
||||
|
||||
@ -99,7 +99,7 @@ export default {
|
||||
username: this.$store.state.user.name,
|
||||
options: {
|
||||
target: api.simpleUploadURL,
|
||||
chunkSize: 3 * 1024 * 1024,
|
||||
chunkSize: 2 * 1024 * 1024,
|
||||
// speedSmoothingFactor: 0.1,
|
||||
// progressCallbacksInterval: 500,
|
||||
maxChunkRetries: 3, // 最大重试次数
|
||||
|
||||
@ -77,6 +77,7 @@ export default {
|
||||
shareId: this.shareId,
|
||||
fileId: this.file.id,
|
||||
id: this.file.id,
|
||||
fileName: this.file.name,
|
||||
path: encodeURI(this.file.path),
|
||||
username: this.$store.state.user.name
|
||||
}).then((res) => {
|
||||
|
||||
@ -883,8 +883,10 @@ export default {
|
||||
this.getFileList();
|
||||
},
|
||||
getFileList(onLoad) {
|
||||
console.log("getFileList", onLoad)
|
||||
this.beforeLoadData(onLoad)
|
||||
api.fileList({
|
||||
username: this.$store.state.user.name,
|
||||
userId: this.$store.state.user.userId,
|
||||
currentDirectory: encodeURI(this.$route.query.path),
|
||||
queryFileType: this.queryFileType,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user