Commit 0d7f0f0a by chenwq

refactor(calendar): 替换图片组件并优化样式

- 将 image 组件替换为 gl-image 以支持 webp 格式
- 调整日历组件的样式,包括颜色、间距和字体
- 统一左右箭头图标的边距和大小
1 parent a93318a3
<view class="line"></view>
<view class="row year-select">
<view class="row last-year" bindtap="lastYear">
<image class="icon left" src="/images/arrow-left.png" mode="aspectFit"></image>
<gl-image class="icon left" src="{{ '/miniProgram/arrow-left.png' }}" webp></gl-image>
<view>上一年</view>
</view>
<view class="timeType">{{year}}年</view>
<view class="row next-year" bindtap="nextYear" style="visibility: {{showNextYear ? 'visible' : 'hidden'}}">
<!-- 下一年 -->
<view style="">下一年</view>
<image class="icon right" src="/images/arrow-right.png" mode="aspectFit"></image>
<gl-image class="icon right" src="{{ '/miniProgram/arrow-right.png' }}" webp></gl-image>
</view>
</view>
......
<view class="line"></view>
<view class="row year-select">
<view class="row last-year" bindtap="lastMonth">
<image class="icon left" src="/images/arrow-left.png" mode="aspectFit"></image>
<gl-image class="icon left" src="{{ '/miniProgram/arrow-left.png' }}" webp></gl-image>
<view>上个月</view>
</view>
<view class="timeType">{{year}}-{{month < 10 ? '0' + month : month}}</view>
<view class="row next-year" bindtap="nextMonth" style="visibility: {{showNextMonth ? 'visible' : 'hidden'}}">
<!-- 下一个月 -->
<view style="">下一个月</view>
<image class="icon right" src="/images/arrow-right.png" mode="aspectFit"></image>
<view style="">下个月</view>
<gl-image class="icon right" src="{{ '/miniProgram/arrow-right.png' }}" webp></gl-image>
</view>
</view>
......
......@@ -6,6 +6,12 @@
background: #fff;
}
.line {
height: 1rpx;
width: 100%;
background-color: gainsboro;
}
.year-select {
height: 80rpx;
flex-direction: row;
......@@ -17,32 +23,45 @@
.next-year {
flex-direction: row;
font-size: 28rpx;
color: #666;
color: #181A1F;
align-items: center;
}
.icon {
width: 30rpx;
height: 30rpx;
width: 36rpx;
height: 36rpx;
}
.left {
margin-right: 10rpx;
}
.left {
margin-left: 10rpx;
}
.right {
margin-left: 10rpx;
margin-right: 10rpx;
}
.timeType {
font-size: 32rpx;
font-family: PingFangSC-Medium;
font-weight: 500;
color: #333;
font-size: 28rpx;
color: #181A1F;
width: 280rpx;
height: 64rpx;
text-align: center;
line-height: 64rpx;
border-radius: 20px;
background: #f2f3f5;
}
.month-scroll {
width: 100%;
white-space: nowrap;
background: #fff;
padding-top: 12rpx;
/* padding: 30rpx 0; */
}
......@@ -69,7 +88,7 @@
.month-text {
font-size: 28rpx;
color: #333;
color: #292D33;
}
.month-item.selected {
......@@ -81,7 +100,7 @@
}
.month-item.disabled .month-text {
color: #ccc;
color: #BEC1C7;
}
.empty-badge {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!