Commit 0d7f0f0a by chenwq

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

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