tdesign-mobile-vue
Version:
tdesign-mobile-vue
165 lines (140 loc) • 2.94 kB
text/less
@import "../../base.less";
@title-font-size: 18px;
@title-color: @text-color-primary;
@days-item-color: @text-color-secondary;
@dates-item-suffix-color: @text-color-placeholder;
@calendar-disabled-color: @text-color-disabled;
@calendar-centre-color: @brand-color-light;
.@{prefix}-calendar {
position: relative;
z-index: 9999;
background: #fff;
overflow-x: hidden;
border-top-left-radius: 12px;
border-top-right-radius: 12px;
&__title {
display: flex;
align-items: center;
justify-content: center;
font-size: @title-font-size;
font-weight: 600;
color: @title-color;
height: 26px;
padding: 16px;
}
&__close-btn {
position: absolute;
top: 16px;
right: 16px;
}
&__days {
display: flex;
justify-content: space-around;
align-items: center;
padding: 0 16px;
text-align: center;
line-height: 46px;
&-item {
width: 44px;
height: 46px;
font-size: 14px;
color: @days-item-color;
}
}
&__value {
display: flex;
align-items: center;
justify-content: center;
margin: 6px 0;
color: #909399;
font-size: 14px;
}
&__content {
min-height: 200px;
display: flex;
flex-direction: column;
}
&__month {
font-size: 14px;
color: @title-color;
font-weight: 600;
padding: 16px 0 0;
&s {
max-height: 456px;
overflow-y: scroll;
padding: 0 16px 16px;
&::-webkit-scrollbar {
display: none;
}
}
}
&__dates {
flex: 1;
display: flex;
align-items: center;
flex-wrap: wrap;
&-item {
position: relative;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
border-radius: 8px;
width: 49px;
height: 60px;
line-height: 24px;
font-weight: 600;
cursor: pointer;
margin-top: 8px;
&-prefix,
&-suffix {
position: absolute;
font-size: 10px;
line-height: 16px;
width: 100%;
text-align: center;
font-weight: 400;
}
&-prefix {
top: 4px;
}
&-suffix {
bottom: 4px;
color: @dates-item-suffix-color;
&--selected,
&--start,
&--end {
color: #fff;
}
&--disabled {
color: @calendar-disabled-color;
}
}
&--selected,
&--start,
&--end {
background: #0053db;
color: #fff;
border-radius: 4px;
}
&--start {
border-radius: 4px 0 0 4px;
}
&--end {
border-radius: 0 4px 4px 0;
}
&--centre {
border-radius: 0;
background-color: @calendar-centre-color;
}
&--disabled {
color: @calendar-disabled-color;
cursor: default;
}
}
}
&__footer {
border-top: 1px solid #e7e7e7;
padding: 16px;
}
}