前言
一、picker
官方和网上的示例给出的picker用起来不是那么方便,调整联动内容需要修改前端,目前没有发现好的方法;自己写一个,做个记录,方便使用。
二、前端代码
wxml
<view class="container">
<view class="section">
<view class="section__title" wx:for="{
{firstList}}" wx:key="id"></view>
<picker bindchange="bindPickerChange1" value="{
{firstListIndex}}" range="{
{firstList}}" range-key="name">
<view class="picker">当前选择11:{
{
firstList[objectIndex1].name}}</view>
</picker>
</view>
<view class="section">
<view class="section__title" wx:for="{
{secondList}}" wx:key="id"></view>
<picker bindchange="bindPickerChange2" value="{
{secondListIndex}}" range