mirror of
https://github.com/CzBiX/qb-web.git
synced 2026-04-01 01:50:51 +08:00
Expand filter group if has selected
This commit is contained in:
@@ -121,7 +121,7 @@ interface MenuItem {
|
||||
icon: string;
|
||||
'icon-alt'?: string;
|
||||
title: string;
|
||||
model?: boolean;
|
||||
model?: boolean | null;
|
||||
select?: string;
|
||||
click?: () => void;
|
||||
children?: MenuChildrenItem[];
|
||||
@@ -250,7 +250,7 @@ export default class Drawer extends Vue {
|
||||
icon: 'mdi-menu-up',
|
||||
'icon-alt': 'mdi-menu-down',
|
||||
title: tr('state._'),
|
||||
model: false,
|
||||
model: null,
|
||||
select: 'state',
|
||||
children: [
|
||||
{
|
||||
@@ -264,7 +264,7 @@ export default class Drawer extends Vue {
|
||||
icon: 'mdi-menu-up',
|
||||
'icon-alt': 'mdi-menu-down',
|
||||
title: tr('category', 0),
|
||||
model: !this.$vuetify.breakpoint.xsOnly,
|
||||
model: null,
|
||||
select: 'category',
|
||||
children: [
|
||||
{
|
||||
@@ -278,7 +278,7 @@ export default class Drawer extends Vue {
|
||||
icon: 'mdi-menu-up',
|
||||
'icon-alt': 'mdi-menu-down',
|
||||
title: tr('sites'),
|
||||
model: false,
|
||||
model: null,
|
||||
select: 'site',
|
||||
children: [
|
||||
{
|
||||
|
||||
@@ -68,6 +68,9 @@ export default class FilterGroup extends Vue {
|
||||
} else {
|
||||
this.select(null);
|
||||
}
|
||||
if (this.model == null) {
|
||||
this.model = this.selected != null;
|
||||
}
|
||||
}
|
||||
|
||||
select(key: string | null) {
|
||||
|
||||
@@ -2,7 +2,7 @@ export interface Group {
|
||||
title: string;
|
||||
icon: string;
|
||||
children: Child[];
|
||||
model: boolean;
|
||||
model: boolean | null;
|
||||
select: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user