Add drawer-detail-badge-value support (#476)

This commit is contained in:
Rijk van Zanten
2020-04-24 17:26:22 -04:00
committed by GitHub
parent 91e67ea581
commit d460946a34
3 changed files with 10 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
<div class="drawer-detail">
<button class="toggle" @click="toggle" :class="{ open: active }">
<div class="icon">
<v-badge dot :disabled="!dot">
<v-badge :value="badge" :disabled="!badge">
<v-icon :name="icon" />
</v-badge>
</div>
@@ -34,9 +34,9 @@ export default defineComponent({
type: String,
required: true,
},
dot: {
type: Boolean,
default: false,
badge: {
type: String,
default: null,
},
},
setup(props) {

View File

@@ -21,6 +21,7 @@ the private `drawer-detail-group` component in `private-view`.
|----------|-------------------------------------------|------------|
| `icon`* | Icon to be displayed in the toggle header | `settings` |
| `title`* | Name of the section | -- |
| `badge` | Show badge on icon with passed value | `null` |
## Slots
| Slot | Description |

View File

@@ -1,5 +1,9 @@
<template>
<drawer-detail :dot="filters.length > 0" icon="filter_list" :title="$t('advanced_filter')">
<drawer-detail
:badge="filters.length > 0 ? filters.length : null"
icon="filter_list"
:title="$t('advanced_filter')"
>
<field-filter
v-for="filter in filters"
:key="filter.key"