elementUI 中日历自定义内容 配置具体内容
效果图如下:

代码如下:
<template>
<div class="con-main"> <div class="con-list">
<!-- 日历 -->
<el-calendar>
<!-- 插槽 -->
<template slot="dateCell" slot-scope="{date, data}">
<!-- date 单元格代表的日期 data { type, isSelected, day},type 表示该日期的所属月份,可选值有 prev-month,current-month,next-month;isSelected 标明该日期是否被选中;day 是格式化的日期,格式为 yyyy-MM-dd-->
<div>
<!-- 这里加了周六周天的判断 -->
<div :class="(date.getDay()==6 || date.getDay()==0)?'weeked' :'notweeked'">{{data.day}}</div>
<!-- 数组循环 -->
<div class="cell" v-for="(item,index) in tableData" >
<!-- 加数据 -->
<div v-if="data.day == item.day">
<div v-for="(it,iIndex) in tableData[index].info">
<div class="info">
<i class="el-icon-info"></i>
<b>【{{it.name}}】 </b>
</div>
</div>
</div>
</div>
</div>
</template>
</el-calendar>
</div>
</div>
</template> <script>
export default {
data() {
return {
tableData: [
{
day:'2022-11-01',
info:[
{
all:' all1',
name: 'name1',
},
{
all:'all2',
name: 'name1',
},
],
}, ],
}
},
created() {},
mounted() {
},
methods: {
}
}
</script> <style lang="scss" scoped>
div ::v-deep th.gutter {
display: initial;
}
div ::v-deep .el-calendar-day{
min-height: 110px;
height: inherit !important;
position: relative;
z-index: inherit;
}
.notweeked{
padding: 5px;
text-align: center;
background-color: #f1f6fb;
color: #354158;
}
.weeked{
padding: 5px;
text-align: center;
background-color: rgba(255,0,0,.1);
}
</style>
其中样式中的 div ::v-deep .el-calendar-day 设置了最小高度。
周末加了样式区分。
elementUI 中日历自定义内容 配置具体内容的更多相关文章
- element-ui中table表格表头和表格内容都水平居中,以及斑马纹背景颜色修改
<el-table :data="detalData" stripe //斑马纹 border :header-cell-style="{textAlign: 'c ...
- Spring Boot2 系列教程(十八)Spring Boot 中自定义 SpringMVC 配置
用过 Spring Boot 的小伙伴都知道,我们只需要在项目中引入 spring-boot-starter-web 依赖,SpringMVC 的一整套东西就会自动给我们配置好,但是,真实的项目环境比 ...
- Spring Boot 中自定义 SpringMVC 配置,到底继承谁哪一个类或则接口?
看了这篇文章,写的非常的言简意赅,特此记录下: 1.Spring Boot 1.x 中,自定义 SpringMVC 配置可以通过继承 WebMvcConfigurerAdapter 来实现. 2.Sp ...
- struts2中的constant常量配置
struts2中的constant配置详解 本文主要讲解一下struts2中的constant常量配置,内容主要来自于互联网的整理.<?xml version="1.0" e ...
- .net中自定义过滤器对Response内容进行处理
原文:http://www.cnblogs.com/zgqys1980/archive/2008/09/02/1281895.html 代码DEMO:http://files.cnblogs.com/ ...
- vue如何循环渲染element-ui中table内容
对于大多数前端开发者来说,vuejs+element-ui是开发后台管理系统过程中必不可少的技术框架.而后台管理系统中,最常见的形式就是表格和表单,以便用来增删改查. element-ui中table ...
- 【spring源码学习】spring的IOC容器之自定义xml配置标签扩展namspaceHandler向IOC容器中注册bean
[spring以及第三方jar的案例]在spring中的aop相关配置的标签,线程池相关配置的标签,都是基于该种方式实现的.包括dubbo的配置标签都是基于该方式实现的.[一]原理 ===>sp ...
- 详解Springboot中自定义SpringMVC配置
详解Springboot中自定义SpringMVC配置 WebMvcConfigurer接口 这个接口可以自定义拦截器,例如跨域设置.类型转化器等等.可以说此接口为开发者提前想到了很多拦截层面的需 ...
- WPF界面设计技巧(5)—自定义列表项呈现内容
原文:WPF界面设计技巧(5)-自定义列表项呈现内容 接续上次的程序,稍微改动一下原有样式,并添加一个数据模板,我们就可以达成下面这样的显示功能: 鼠标悬停于文件列表项上,会在工具提示中显示图像缩略图 ...
- Egret入门学习日记 --- 第二十篇(书中 9.1~9.3 节 内容 组件篇)
第二十篇(书中 9.1~9.3 节 内容 组件篇) 第八章中的内容. 以上都是基本的Js知识,我就不录入了. 直接来看 第9章. 开始 9.1节. 以上内容告诉你,Egret官方舍弃了GUI,使用了E ...
随机推荐
- nextLine和hasNextLine的区别
== 重点:如果要判断一个文件这一行是否还有可读数据不能通过nextLine != null 来判断,要用hasNextLine是否为真来判断. == 1.nextLine: 公共字符串nextLin ...
- TP开发项目时遇到的问题记录
1.下载功能. TP自带Http下载类,使用时new一个就行,示例代码: public function download(){ //接收公文id $id = I('get.fid'); //根据公文 ...
- WPF-UI框架MahApps.Metro使用教程
参考教程:https://www.shuzhiduo.com/A/xl561ZaoJr/ 一,MahApps.Metro安装 1,项目中引用"MahApps.Metro.dll"[ ...
- 快速上手SpringBoot
快速上手SpringBoot SpringBoot是用来简化Spring应用的初始化搭建以及开发过程 三个不需要,这是springboot使用mvc区别于其它框架的特点 tomcatd的端口 下一行是 ...
- ES6-Promise下
六.实例的finally方法: promise状态发生变化指的是由初始态变成成功或者失败态 处理错误指的是没有调用catch(失败态实例调用可以执行其回调的then) finally里面的回调函数只要 ...
- 分布式锁 -- redis
原理 redis设置一个key和value,如果存在则获取锁失败,不存在则获取锁成功处理业务,业务处理完成后删除这条数据,可以带个失效时间. 代码 public void handleInvoice( ...
- undefined reference to symbol xxxxx和undefined symbol:xxxx错误的原因分析以及解决方法
Linux下编译程序时,经常会遇到"undefined reference to XXX" 报错,或者运行时出现undefined symbol:xxxx报错. 这里总结一些可能的 ...
- Java基础__04.GUI编程
GUI编程常见的组件: 窗口 弹窗 面板 文本框 列表框 按钮 图片 监听事件 鼠标操作 键盘事件 GUI简介 GUI的核心技术:Swing AWT,是需要jre环境的. AWT介绍 包含了很多类和接 ...
- [Oracle19C ASM管理] ASM服务的启停
自动方式启停 crsctl stat res -t 查看ASM服务的状态,it's ok that ora.ons和ora.diskmon是OFFLINE [grid@centos7-19c.loca ...
- tcpdump: error while loading shared libraries: libpcap.so.1: cannot open shared object file: No such file or directory
[root@inner ~]# tcpdump -i any -s 0 -w trunkm.pcaptcpdump: error while loading shared libraries: lib ...