效果图
实现步骤
引入picker组件
代码语言:javascript复制"van-picker": "@vant/weapp/picker",
页面显示
代码语言:javascript复制<picker bindchange="bindPickerLineChange"
range-key="{{'name'}}"
value="{{arrayLine.name}}"
range="{{arrayLine}}"
>
<view class="picker">
<van-field
value="{{chosedLine.name}}"
required
label="线别"
placeholder="请点击选择"
size="large"
readonly="readonly"
/>
</view>
</picker>