mirror of
https://github.com/directus/directus.git
synced 2026-01-27 22:57:56 -05:00
Add drawer-detail-badge-value support (#476)
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user