add query params to remember opened texts & define what component to append based on those query
This commit is contained in:
@@ -17,7 +17,11 @@ export default [
|
||||
},
|
||||
props: {
|
||||
default: ({ query }) => ({
|
||||
mode: query.mode || 'tree-map'
|
||||
mode: query.mode || 'tree-map',
|
||||
// In case of a reload or direct link, vue-router doesn't turn the query string into an array.
|
||||
texts: query.texts && query.texts.length && typeof query.texts[0] === 'string'
|
||||
? query.texts.map(text => text.split(',').map(id => parseInt(id)))
|
||||
: query.texts
|
||||
}),
|
||||
options: ({ query }) => ({
|
||||
show: !('texts' in query)
|
||||
|
||||
Reference in New Issue
Block a user