refresh collections, fix #219
This commit is contained in:
@@ -13,6 +13,7 @@ import { mdiMagnify, mdiClose } from '@mdi/js'
|
|||||||
export default {
|
export default {
|
||||||
data: () => ({
|
data: () => ({
|
||||||
mdiMagnify, mdiClose,
|
mdiMagnify, mdiClose,
|
||||||
|
oldRoute: '',
|
||||||
collections: []
|
collections: []
|
||||||
}),
|
}),
|
||||||
async fetch () {
|
async fetch () {
|
||||||
@@ -24,7 +25,12 @@ export default {
|
|||||||
return this.$route.name === 'index'
|
return this.$route.name === 'index'
|
||||||
},
|
},
|
||||||
showCollectionsBar () {
|
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'])
|
...mapState(['settings'])
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user