feat: add slot for trigger button in <datepicker-with-range> component
This commit is contained in:
parent
ccd8602bfd
commit
c41397f5db
1 changed files with 5 additions and 3 deletions
|
@ -2,9 +2,11 @@
|
|||
<div class="datepicker-with-range-container">
|
||||
<popup>
|
||||
<template #trigger="{toggle}">
|
||||
<x-button @click.prevent.stop="toggle()" type="secondary" :shadow="false" class="mb-2">
|
||||
{{ $t('task.show.select') }}
|
||||
</x-button>
|
||||
<slot name="trigger" :toggle="toggle">
|
||||
<x-button @click.prevent.stop="toggle()" type="secondary" :shadow="false" class="mb-2">
|
||||
{{ $t('task.show.select') }}
|
||||
</x-button>
|
||||
</slot>
|
||||
</template>
|
||||
<template #content="{isOpen}">
|
||||
<div class="datepicker-with-range" :class="{'is-open': isOpen}">
|
||||
|
|
Loading…
Reference in a new issue