mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat(Calendar): add month mark
This commit is contained in:
parent
c53c4a78bb
commit
9f1e3b0fde
@ -90,6 +90,7 @@ export default createComponent({
|
||||
<div class={bem('month')} ref="month" refInFor>
|
||||
{showTitle && <div class={bem('month-title')}>{month.title}</div>}
|
||||
<div class={bem('days')}>
|
||||
<div class={bem('month-mark')}>{month.date.getMonth() + 1}</div>
|
||||
{month.days.map(item => (
|
||||
<div class={bem('day')}>{item.day}</div>
|
||||
))}
|
||||
|
@ -49,10 +49,22 @@
|
||||
}
|
||||
|
||||
&__days {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
&__month-mark {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
z-index: -1;
|
||||
color: @gray-2;
|
||||
font-size: 160px;
|
||||
transform: translate(-50%, -50%);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&__day {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
Loading…
x
Reference in New Issue
Block a user