Skip to content

Commit

Permalink
Merge pull request #256 from jamebal/search
Browse files Browse the repository at this point in the history
perf: 优化搜索状态下跳转目录的操作
  • Loading branch information
jamebal authored Aug 3, 2024
2 parents 867516e + 0f67764 commit e97475c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/ShowFile/ShowFile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2367,7 +2367,7 @@ export default {
this.path = this.path.replace(/\\/g, '/')
})
let queryFolder = localStorage.getItem('mountFileOwner') ? localStorage.getItem(this.path) : this.$route.query.folder
const searchOpenFolder = this.$route.query.searchOpenFolder ? `&searchOpenFolder=${this.$route.query.searchOpenFolder}` : ''
let searchOpenFolder = this.$route.query.searchOpenFolder ? `&searchOpenFolder=${this.$route.query.searchOpenFolder}` : ''
if (!unPushLink) {
const queryTagId = this.$route.query.tagId
? `&tagId=${this.$route.query.tagId}`
Expand All @@ -2383,6 +2383,7 @@ export default {
const searchPathIndex = this.pathList.findIndex(item => item.search)
if (searchPathIndex < 0) {
keywordQuery = ''
searchOpenFolder = ''
}
this.$router.push(`?vmode=${this.vmode}&path=${encodeURI(this.path).replaceAll('#', '%23')}${queryFolder ? '&folder=' + queryFolder : ''}${queryTagId}${basePath}${keywordQuery}${searchOpenFolder}`)
}
Expand Down

0 comments on commit e97475c

Please sign in to comment.