小程序之调起选择器

2022-03-07 20:43:01 浏览数 (2)

效果图

实现步骤

引入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>

0 人点赞