element-plus/docs/examples/calendar/customize.vue
qiang 1e6dbd8558
refactor(components): [calendar] rename slot dateCell to date-cell (#9590)
* refactor(components): [calendar] rename slot dateCell to date-cell

closed 9565

* docs: update

* fix(components): [calendar] avoid slots taking effect at the same time
2022-09-03 23:23:10 +08:00

17 lines
328 B
Vue

<template>
<el-calendar>
<template #date-cell="{ data }">
<p :class="data.isSelected ? 'is-selected' : ''">
{{ data.day.split('-').slice(1).join('-') }}
{{ data.isSelected ? '✔️' : '' }}
</p>
</template>
</el-calendar>
</template>
<style>
.is-selected {
color: #1989fa;
}
</style>