fix: 修复搜索状态下进入某个文件夹后上传文件位置错误的问题
This commit is contained in:
parent
524b31ee19
commit
5b02458d14
@ -1502,7 +1502,12 @@ export default {
|
||||
this.fileList[index].updateDate = fileDoc.updateDate
|
||||
}
|
||||
}
|
||||
const isCurrentPath = (this.path + '/') === fileDoc
|
||||
let thisPath = this.path
|
||||
if (this.listModeSearchOpenDir) {
|
||||
const row = this.pathList[this.pathList.length - 1]
|
||||
thisPath = `${row.row.path}${row.folder}`
|
||||
}
|
||||
const isCurrentPath = (thisPath + '/') === fileDoc
|
||||
if ('deleteFile' === url && (isCurrentPath || this.$route.path.startsWith('/recently'))) {
|
||||
this.getFileListEnter()
|
||||
}
|
||||
@ -1513,18 +1518,18 @@ export default {
|
||||
if (fileDoc && fileDoc.name) {
|
||||
this.onCreateFilename = fileDoc.name
|
||||
}
|
||||
if (!this.path) {
|
||||
this.path = ''
|
||||
if (!thisPath) {
|
||||
thisPath = ''
|
||||
}
|
||||
if (fileDoc) {
|
||||
if (fileDoc.$set) {
|
||||
let path = fileDoc.$set.path
|
||||
path = path.replace(/\\/g, '/')
|
||||
if (this.path + '/' === path) {
|
||||
if (thisPath + '/' === path) {
|
||||
this.getFileListEnter()
|
||||
}
|
||||
} else {
|
||||
if (this.path + '/' === fileDoc.path) {
|
||||
if (thisPath + '/' === fileDoc.path) {
|
||||
this.getFileListEnter()
|
||||
}
|
||||
}
|
||||
|
||||
@ -310,7 +310,7 @@ export default {
|
||||
currentDirectory: this.$route.query.path || '/',
|
||||
username: this.$store.state.user.name,
|
||||
userId: this.$store.state.user.userId,
|
||||
folder: this.$route.query.folder
|
||||
folder: this.$route.query.searchOpenFolder || this.$route.query.folder
|
||||
}
|
||||
},
|
||||
isPath(str) {
|
||||
@ -400,17 +400,17 @@ export default {
|
||||
this.uploader.resume()
|
||||
})
|
||||
},
|
||||
setPageTitle() {
|
||||
setPageTitle(netSpeed) {
|
||||
if (this.process === -10 || this.process === 100 || this.fileListLength === 0) {
|
||||
document.title = `${this.$route.meta.title}`
|
||||
} else {
|
||||
document.title = `${this.process}% | ${this.$route.meta.title}`
|
||||
document.title = `${this.process}% | ${netSpeed}`
|
||||
}
|
||||
},
|
||||
onFileProgress(rootFile, file, chunk) {
|
||||
this.netSpeed = formatNetSpeed(file.currentSpeed, false)
|
||||
this.process = Math.trunc(window.uploader.progress() * 100)
|
||||
this.setPageTitle()
|
||||
this.setPageTitle(this.netSpeed)
|
||||
if (rootFile.isFolder && this.process < 100) {
|
||||
this.statusSet(rootFile.id, 'progress', formatNetSpeed(file.currentSpeed, true))
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user