index.wxml 1.5 KB
<view wx:if="{{provinceShow}}" class="dialog_mask {{provinceShow?'dialog_show':''}}">
    <view class="dialog_mask" bindtap="cancel"></view>
    <view class="dialog_container">
        <view class="header flex_scb">
            <view class="cancle" bindtap="cancel">取消</view>
            <view class="title">城市地区</view>
            <view class="comfirm" bindtap="comfirm">确定</view>
        </view>
        <view class="main">
            <picker-view indicator-style="height: 50px;" style="width: 100%; height: 100%;" value="{{region}}" bindchange="bindChange">
                <picker-view-column>
                    <view wx:for="{{provinceList}}" wx:key="{{item.addressCode}}" style="line-height: 50px; text-align: center;">
                        {{item.addressName}}
                    </view>
                </picker-view-column>
                <picker-view-column>
                    <view wx:for="{{provinceList[region[0]].children}}" wx:key="{{item.addressCode}}" style="line-height: 50px; text-align: center;">
                        {{item.addressName}}
                    </view>
                </picker-view-column>
                <picker-view-column>
                    <view wx:for="{{provinceList[region[0]].children[region[1]].children}}" wx:key="{{item.addressCode}}" style="line-height: 50px; text-align: center;">
                        {{item.addressName}}
                    </view>
                </picker-view-column>
            </picker-view>
        </view>
    </view>
</view>