您好,研究了一下,可以将下方js
window.FgcElement = window.FgcElement || {};
window.FgcElement.CalendarSlots = window.FgcElement.CalendarSlots || {};
window.FgcElement.CalendarSlots.Cell = window.FgcElement.CalendarSlots.Cell || {};
window.FgcElement.CalendarSlots.Cell["custom_date_cell"] = function() {
return `
<div class="calendar-container" :style="calendarContainerStyle" v-if="calendarContainerStyle" @dblclick="handleDoubleClick(data)">
<div class="calendar-date-container">
<div>{{ formatDay(data.day)}}</div>
<div>
<div class="fgc-calendar-ellipsis" v-if="insufficientHeight && getOptionsByDay(data).length"/>
</div>
</div>
<div class="calendar-schedule-container" v-if="!insufficientHeight">
<el-scrollbar>
<div class="calendar-schedule-item" v-for="option in getOptionsByDay(data)"
@click="scheduleOnClick(option)" @dblclick="scheduleOnDoubleClick($event,option)">
<div
:title="option.text"
:class="{'calendar-schedule-item-text': true, 'blue-color': option.text === '设计', 'green-color': option.text === '报销', 'orange-color': option.text === '需求评审会', 'gray-color': data.date.getTime() < new Date(new Date().setHours(0, 0, 0, 0))}"
>{{option.text}}</div>
</div>
</el-scrollbar>
</div>
</div>`
} 下方css代码
.gray-color {
color: gray !important;
}
.blue-color {
color: blue;
}
.green-color {
color: green;
}
.orange-color {
color: orange;
} 放到这里
再将el日历的css类名修改为custom_date_cell即可
|