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

<view class="wrapper">
    <view class="title">
        <text> 电表列表 </text>
    </view>
    <view style="display: flex; align-items: center;margin-top: 20rpx;">
        <van-icon name="arrow-left" size="50rpx" bind:tap="scrollLeft" />
        <scroll-view
            scroll-x="{{true}}"
            class="meterListScrollView"
            scroll-left="{{scrollLeft}}" 
            bindscroll="onScroll" 
            scroll-with-animation="true"
        >
            <view style="display: flex;" class="scroll-content">
                <meter-item 
                    active="{{active === index}}" 
                    wx:for="{{list}}" 
                    wx:key="id" 
                    meter="{{item}}" 
                    bind:click="handleSelect"
                    data-index="{{index}}"
                    data-id="{{item.meterId}}" 
                />
            </view>
        </scroll-view>
        <van-icon name="arrow" size="50rpx" bind:tap="scrollRight" />
    </view>
    
</view>
