优化月视图长姓名滚动展示
This commit is contained in:
@@ -142,7 +142,12 @@
|
||||
</block>
|
||||
<block wx:else>
|
||||
<view wx:for="{{item.rowBlocks}}" wx:for-item="block" wx:key="key" class="month-row-block {{monthRowLabelVisible ? 'named' : ''}} {{block.statusClass}}" style="background: {{block.color}};" data-id="{{block.orderItemId || block.id}}" data-order-item-id="{{block.orderItemId || block.id}}" catchtap="openAppointment">
|
||||
<text wx:if="{{monthRowLabelVisible}}" data-id="{{block.orderItemId || block.id}}" data-order-item-id="{{block.orderItemId || block.id}}">{{block.customerName}}</text>
|
||||
<view wx:if="{{monthRowLabelVisible}}" class="month-row-name {{block.customerName.length > 4 ? 'scrolling' : ''}}" data-id="{{block.orderItemId || block.id}}" data-order-item-id="{{block.orderItemId || block.id}}">
|
||||
<view class="month-row-name-track">
|
||||
<text class="month-row-name-text">{{block.customerName}}</text>
|
||||
<text wx:if="{{block.customerName.length > 4}}" class="month-row-name-text month-row-name-copy">{{block.customerName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{item.totalCount === 0}}" class="month-empty">空</view>
|
||||
</block>
|
||||
|
||||
@@ -1007,6 +1007,46 @@
|
||||
font-size: 16rpx;
|
||||
}
|
||||
|
||||
.month-row-name {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.month-row-name-track {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.month-row-name.scrolling .month-row-name-track {
|
||||
max-width: none;
|
||||
animation: month-row-name-scroll 4.8s linear infinite;
|
||||
}
|
||||
|
||||
.month-row-name-text {
|
||||
flex: none;
|
||||
display: block;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.month-row-name-copy {
|
||||
padding-left: 18rpx;
|
||||
}
|
||||
|
||||
@keyframes month-row-name-scroll {
|
||||
0%,
|
||||
20% {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
80%,
|
||||
100% {
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.month-blocks .month-empty {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user