微信小程序picker传参

<view class="div-item">
            <view class='span'>省份</view>
            <picker mode="selector" range='{{province_data}}' range-key="province_name" bindchange='ProvinceBindChange' value='indexx'>
                  {{area_data[0]}}
            </picker>
        </view>
        <view class="div-item">
            <view class='span'>城市</view>

            <picker mode="selector" range='{{city_data}}' range-key="city_name" bindchange='CityBindChange' value='indexx'>
            {{area_data[1]}}
            </picker>
           
        </view>
        <view class="div-item">
            <view class='span'>区县</view>

            <picker mode="selector" range='{{district_data}}' range-key="district_name" bindchange='DistrictBindChange' value='indexx'>
                 {{area_data[2]}}
            </picker>
       
        </view>
data: {
        data: null,
        province_data: [{
            province_id: 0,
            name: '请选择省份'
        }],
        city_data: [{
            city_id: 0,
            city_name: '请先选择省份'
        }],
        district_data: [{
            district_id: 0,
            district_name: '请先选择区县'
        }],
        area_data: ['当前选择省份', '当前选择城市', '当前选择区县'],
        consigner:null,
        mobile:null,
        province:null,
        city:null,
        district:null,
        address:null,

    },


方便复用


回到顶部