quasar-ui-danx 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -31,20 +31,8 @@ const props = defineProps({
|
|
31
31
|
type: Object,
|
32
32
|
required: true
|
33
33
|
},
|
34
|
-
filterGroups: {
|
35
|
-
type: Array,
|
36
|
-
required: true
|
37
|
-
},
|
38
34
|
showFilters: Boolean
|
39
35
|
});
|
40
36
|
|
41
|
-
const
|
42
|
-
return props.filterGroups.reduce((acc, fg) => {
|
43
|
-
fg.fields.forEach(f => {
|
44
|
-
acc[f.name] = true;
|
45
|
-
});
|
46
|
-
return acc;
|
47
|
-
}, {});
|
48
|
-
});
|
49
|
-
const activeCount = computed(() => Object.keys(props.filter).filter(key => props.filter[key] !== undefined && filterNameDictionary.value[key]).length);
|
37
|
+
const activeCount = computed(() => Object.keys(props.filter).filter(key => props.filter[key] !== undefined).length);
|
50
38
|
</script>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="w-full flex justify-end items-center flex-nowrap border-b">
|
3
|
+
<FilterListToggle
|
4
|
+
:show-filters="showFilters"
|
5
|
+
:filter="filter"
|
6
|
+
class="border-r p-4 flex-shrink-0"
|
7
|
+
@update:show-filters="$emit('update:show-filters', $event)"
|
8
|
+
@update:filter="$emit('update:filter', $event)"
|
9
|
+
/>
|
10
|
+
|
11
|
+
<div class="flex-grow">
|
12
|
+
<slot />
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<div v-if="$slots['right-side']" class="flex justify-end items-stretch flex-nowrap p-4">
|
16
|
+
<QSeparator vertical class="mx-4 h-10 self-center" />
|
17
|
+
|
18
|
+
<slot name="right-side" />
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
</template>
|
22
|
+
<script setup>
|
23
|
+
import { FilterListToggle } from "quasar-ui-danx";
|
24
|
+
|
25
|
+
defineEmits(["update:show-filters", "update:filter"]);
|
26
|
+
defineProps({
|
27
|
+
filter: {
|
28
|
+
type: Object,
|
29
|
+
default: null
|
30
|
+
},
|
31
|
+
showFilters: Boolean
|
32
|
+
});
|
33
|
+
</script>
|