echarts的 calendar lunar样式修改
html区域:
<div style="margin-top: 30px;">
<div class="flex">
<span>周一</span>
<span>周二</span>
<span>周三</span>
<span>周四</span>
<span>周五</span>
<span>周六</span>
<span>周日</span>
</div>
<div id="myChart" class="cal-box"></div>
</div>
css区域:
.cal-box{
width: calc(100vw - 520px);
min-height: 700px;
margin: auto;
}
.flex {
display: flex;
justify-content: space-around;
align-items: center;
span {
font-size: 24px;
font-weight: bold;
margin: 70px 0 50px;
}
}
传入yyyy-MM格式字符串,生成所需(假)数据,
数据格式
[
[yyyy-MM-dd格式日期,类型1,类型2],…
]
let arr=time.split("-");
let d = new Date(arr