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() {
|
data() {
|
||||||
return {
|
return {
|
||||||
collapsed: [],
|
collapsed: [],
|
||||||
symbols: ['▲', '▼', '▶', '◀'],
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
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) {
|
if (query !== null && query !== undefined) {
|
||||||
this.collapsed = this.unpackInt(parseInt(query), this.sections.length);
|
this.collapsed = this.unpackInt(parseInt(query), this.sections.length);
|
||||||
} else {
|
} else {
|
||||||
this.collapsed = this.sections.map(() => true);
|
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: {
|
computed: {
|
||||||
grouped_items() {
|
grouped_items() {
|
||||||
|
@ -116,8 +108,8 @@ export default {
|
||||||
const encoded = this.packInt(this.collapsed).toString()
|
const encoded = this.packInt(this.collapsed).toString()
|
||||||
if (this.route.query.collapsed !== encoded)
|
if (this.route.query.collapsed !== encoded)
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
...this.$router.currentRoute,
|
...this.route,
|
||||||
query: {...this.$router.currentRoute.query, collapsed: encoded}
|
query: {...this.route.query, collapsed: encoded}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
|
|
Loading…
Reference in a new issue