mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-05 04:37:47 +08:00
1e6dbd8558
* refactor(components): [calendar] rename slot dateCell to date-cell closed 9565 * docs: update * fix(components): [calendar] avoid slots taking effect at the same time
17 lines
328 B
Vue
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>
|