fix: 修复嵌套目录浏览空白和文件扫描重复插入问题
This commit is contained in:
@@ -11,7 +11,7 @@ const router = createRouter({
|
||||
{ path: 'recent/added', name: 'recent-added', component: () => import('../views/RecentAddedView.vue') },
|
||||
{ path: 'recent/played', name: 'recent-played', component: () => import('../views/RecentPlayedView.vue') },
|
||||
{ path: 'browse/:rootId', name: 'browse', component: () => import('../views/BrowseView.vue'), props: true },
|
||||
{ path: 'browse/:rootId/*', name: 'browse-path', component: () => import('../views/BrowseView.vue'), props: true },
|
||||
{ path: 'browse/:rootId/:path(.*)', name: 'browse-path', component: () => import('../views/BrowseView.vue'), props: true },
|
||||
{ path: 'search', name: 'search', component: () => import('../views/SearchView.vue') },
|
||||
],
|
||||
},
|
||||
|
||||
@@ -34,7 +34,7 @@ const rootId = computed(() => Number(route.params.rootId))
|
||||
const pathFromRoute = computed(() => {
|
||||
const wildcard = route.params.path as string | undefined
|
||||
if (!wildcard) return ''
|
||||
return decodeURIComponent(wirecard)
|
||||
return decodeURIComponent(wildcard)
|
||||
})
|
||||
const browsePathArray = computed(() => pathFromRoute.value ? pathFromRoute.value.split('/') : [])
|
||||
const currentBrowsePath = computed(() => browsePathArray.value.join('/'))
|
||||
|
||||
Reference in New Issue
Block a user