refresh collections, fix #219
This commit is contained in:
parent
064bf46df7
commit
c376556a9b
1 changed files with 7 additions and 1 deletions
|
@ -13,6 +13,7 @@ import { mdiMagnify, mdiClose } from '@mdi/js'
|
|||
export default {
|
||||
data: () => ({
|
||||
mdiMagnify, mdiClose,
|
||||
oldRoute: '',
|
||||
collections: []
|
||||
}),
|
||||
async fetch () {
|
||||
|
@ -24,7 +25,12 @@ export default {
|
|||
return this.$route.name === 'index'
|
||||
},
|
||||
showCollectionsBar () {
|
||||
return ['index', 'collection-collection'].includes(this.$route.name)
|
||||
const show = ['index', 'collection-collection'].includes(this.$route.name)
|
||||
if (show && this.oldRoute !== this.$route.name) {
|
||||
this.oldRoute = this.$route.name
|
||||
this.$fetch()
|
||||
}
|
||||
return show
|
||||
},
|
||||
...mapState(['settings'])
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue