javascript - Vuetify - 更改日历月组件的每个日期的颜色
问题描述
我想使用日历月组件显示员工的出勤状态。
<v-calendar type="month" :value="###">
<template v-slot:day="{ present, past, date }">
<v-row no-gutters style="height:2.5rem">
<template v-if="events[date]">
<v-col class="text-center">
<v-chip
label
dark
@click="###"
:title="###"
:color="###"
v-for="###"
:key="i"
>{{###}}</v-chip>
</v-col>
</template>
</v-row>
</template>
</v-calendar>
每个插槽都包含代表另一个数据的芯片。因此,要显示员工的出勤状态(在场或缺席),我想更改日期的颜色。有没有办法做到这一点,或者任何其他关于如何实现此功能的建议将不胜感激。
解决方案
推荐阅读
- gitlab - 使用流覆盖率报告获取 Gitlab CI 覆盖率
- sql-server - SSRS - 如何使用来自不同数据集的值作为图表中的 X 轴
- android - 为什么从 EditText 中选择一个长字并覆盖到下一行时,布局会消失并重新出现?
- typescript - 为什么扩展的泛型类型不能正确解析?
- linux - perf 版本与我的内核版本不匹配
- scala - 从 Seq[B] 中减去 Seq[A]
- sql - 使用 WITH 子句的子查询
- r - 如何在 R 中按重复项对数据进行排序?
- jenkins-pipeline - 脚本化管道中的参数化调度程序
- angular - 将 ng-select 过滤器输入集中在下拉打开