Skip to content

Commit f7772f5

Browse files
committed
feat: Add tp-inline-arrow-[up/down] slots (resolves #884)
1 parent 10e3c33 commit f7772f5

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

src/VueDatePicker/components/TimePicker/TimeInput.vue

+14-4
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,13 @@
3030
<ChevronUpIcon v-if="!$slots['arrow-up']" />
3131
</template>
3232
<template v-else>
33-
<span class="dp__tp_inline_btn_bar dp__tp_btn_in_l"></span>
34-
<span class="dp__tp_inline_btn_bar dp__tp_btn_in_r"></span>
33+
<template v-if="$slots['tp-inline-arrow-up']">
34+
<slot name="tp-inline-arrow-up" />
35+
</template>
36+
<template v-else>
37+
<span class="dp__tp_inline_btn_bar dp__tp_btn_in_l"></span>
38+
<span class="dp__tp_inline_btn_bar dp__tp_btn_in_r"></span>
39+
</template>
3540
</template>
3641
</button>
3742
<button
@@ -86,8 +91,13 @@
8691
<ChevronDownIcon v-if="!$slots['arrow-down']" />
8792
</template>
8893
<template v-else>
89-
<span class="dp__tp_inline_btn_bar dp__tp_btn_in_l"></span>
90-
<span class="dp__tp_inline_btn_bar dp__tp_btn_in_r"></span>
94+
<template v-if="$slots['tp-inline-arrow-down']">
95+
<slot name="tp-inline-arrow-down" />
96+
</template>
97+
<template v-else>
98+
<span class="dp__tp_inline_btn_bar dp__tp_btn_in_l"></span>
99+
<span class="dp__tp_inline_btn_bar dp__tp_btn_in_r"></span>
100+
</template>
91101
</template>
92102
</button>
93103
</template>

src/VueDatePicker/composables/slots.ts

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ export const slots = [
4040
{ name: 'marker', use: ['calendar', 'shared'] },
4141
{ name: 'quarter', use: ['shared'] },
4242
{ name: 'top-extra', use: ['shared', 'month-year'] },
43+
{ name: 'tp-inline-arrow-up', use: ['shared', 'time'] },
44+
{ name: 'tp-inline-arrow-down', use: ['shared', 'time'] },
4345
];
4446

4547
export const inputSlots = [{ name: 'trigger' }, { name: 'input-icon' }, { name: 'clear-icon' }, { name: 'dp-input' }];

0 commit comments

Comments
 (0)