quasar-ui-danx 0.0.25 → 0.0.26
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
>
|
10
10
|
<FilterGroupList
|
11
11
|
:filter="filter"
|
12
|
-
:filter-
|
12
|
+
:filter-fields="filterFields"
|
13
13
|
@update:filter="$emit('update:filter', $event)"
|
14
14
|
/>
|
15
15
|
</CollapsableSidebar>
|
@@ -29,7 +29,7 @@ defineProps({
|
|
29
29
|
type: Object,
|
30
30
|
default: null
|
31
31
|
},
|
32
|
-
|
32
|
+
filterFields: {
|
33
33
|
type: Array,
|
34
34
|
default: () => []
|
35
35
|
}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<q-list>
|
3
3
|
<div class="px-4 py-2 max-w-full">
|
4
4
|
<template
|
5
|
-
v-for="(group, index) in
|
5
|
+
v-for="(group, index) in filterFields"
|
6
6
|
:key="'group-' + group.name"
|
7
7
|
>
|
8
8
|
<template v-if="group.flat">
|
@@ -34,12 +34,12 @@
|
|
34
34
|
</FilterGroupItem>
|
35
35
|
|
36
36
|
<q-separator
|
37
|
-
v-if="index < (
|
37
|
+
v-if="index < (filterFields.length - 1)"
|
38
38
|
class="my-2"
|
39
39
|
/>
|
40
40
|
</template>
|
41
41
|
</div>
|
42
|
-
|
42
|
+
</q-list>
|
43
43
|
</template>
|
44
44
|
<script setup>
|
45
45
|
import { computed } from 'vue';
|
@@ -48,7 +48,7 @@ import FilterGroupItem from './FilterGroupItem';
|
|
48
48
|
|
49
49
|
const emit = defineEmits(['update:filter']);
|
50
50
|
const props = defineProps({
|
51
|
-
|
51
|
+
filterFields: {
|
52
52
|
type: Array,
|
53
53
|
required: true
|
54
54
|
},
|
@@ -61,7 +61,7 @@ const props = defineProps({
|
|
61
61
|
|
62
62
|
const activeCountByGroup = computed(() => {
|
63
63
|
const activeCountByGroup = {};
|
64
|
-
for (const group of props.
|
64
|
+
for (const group of props.filterFields) {
|
65
65
|
activeCountByGroup[group.name] = group.fields.filter(field => props.filter[field.name] !== undefined).length;
|
66
66
|
}
|
67
67
|
return activeCountByGroup;
|