Skip to content

Commit a582cc9

Browse files
committed
feat: add slot to modify day of week name
1 parent 74a93b8 commit a582cc9

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/components/core/calendar.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,17 @@
3737
@hover="onHover"
3838
@blur="onBlur"
3939
>
40+
<template
41+
slot="day-of-week"
42+
slot-scope="wd, index">
4043

44+
<slot
45+
v-bind="wd, index"
46+
name="day-of-week">
47+
{{ wd }}
48+
</slot>
49+
50+
</template>
4151
<template
4252
slot="day"
4353
slot-scope="props">

src/components/core/month.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111
:key="index"
1212
class="col">
1313
<div class="vuec-week-content">
14-
{{ wd }}
14+
<slot
15+
v-bind="wd, index"
16+
name="day-of-week">
17+
{{ wd }}
18+
</slot>
1519
</div>
1620
<div class="vuec-week-placeholder"/>
1721
</div>

0 commit comments

Comments
 (0)