stash
This commit is contained in:
parent
b32645b18e
commit
18cb69f4f4
1 changed files with 3 additions and 11 deletions
|
@ -73,23 +73,15 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
collapsed: [],
|
||||
symbols: ['▲', '▼', '▶', '◀'],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
const query = this.$router.currentRoute ? (this.$router.currentRoute.query ? this.$router.currentRoute.query.collapsed : null) : null;
|
||||
const query = this.route ? (this.route.query ? this.route.query.collapsed : null) : null;
|
||||
if (query !== null && query !== undefined) {
|
||||
this.collapsed = this.unpackInt(parseInt(query), this.sections.length);
|
||||
} else {
|
||||
this.collapsed = this.sections.map(() => true);
|
||||
}
|
||||
|
||||
//this.$router.push({...this.$router.currentRoute, query: {...this.$router.currentRoute.query, layout}});
|
||||
//this.collapsed = this.sections.map(() => true);
|
||||
/*this.columns.map(e => ({
|
||||
k: e,
|
||||
v: this.$store.getters.getFilters[e]
|
||||
})).filter(e => e.v).forEach(e => this.setFilter(e.k, e.v));*/
|
||||
},
|
||||
computed: {
|
||||
grouped_items() {
|
||||
|
@ -116,8 +108,8 @@ export default {
|
|||
const encoded = this.packInt(this.collapsed).toString()
|
||||
if (this.route.query.collapsed !== encoded)
|
||||
this.$router.push({
|
||||
...this.$router.currentRoute,
|
||||
query: {...this.$router.currentRoute.query, collapsed: encoded}
|
||||
...this.route,
|
||||
query: {...this.route.query, collapsed: encoded}
|
||||
});
|
||||
},
|
||||
deep: true,
|
||||
|
|
Loading…
Reference in a new issue