<!--pages/writeReading/components/meterList/index.wxml-->

<view class="wrapper">
    <view class="title">
        <text> 电表列表 (总计{{list.length}}块，已抄{{list.length - finishNumber}}块) </text>
    </view>
    <view style="display: flex; align-items: center;margin-top: 20rpx;">
        <!-- <van-icon name="arrow-left" size="50rpx" bind:tap="handleScrollLeft" /> -->
        <scroll-view
            scroll-x="{{true}}"
            class="meterListScrollView"
            scroll-left="{{scrollLeft}}" 
            scroll-with-animation="{{true}}"
            scroll-anchoring="{{true}}"
        >
            <view style="display: flex;" class="scroll-content">
                <meter-item 
                    active="{{active === index}}" 
                    wx:for="{{list}}" 
                    wx:key="id" 
                    meter="{{item}}" 
                    catch:click="handleSelect"
                    data-index="{{index}}"
                    data-id="{{item.meterId}}" 
                    status="{{item.status}}"
                />
            </view>
        </scroll-view>
        <!-- <van-icon name="arrow" size="50rpx" bind:tap="handleScrollRight" /> -->
    </view>
</view>
