收藏
回答

picker-view重新渲染如果列数不同,默认选项会显示错误

在同一个页面中有两个选项需要用到picker-view。其中一个是1列选项,另一个是2列选项,在切换显示的过程中,如果从2列切换成1列显示,则无法显示为默认的选项。

回答关注问题邀请回答
收藏

2 个回答

  • meegle
    meegle
    2017-08-03
    <view hidden="{{sel_hidden}}">
    <view class="cal-num_disable">view>
        <view class="weui-footer weui-footer_fixed-bottom">
            <view class="weui-form-preview__ft cal-num_picker_ok">
                <button class="weui-form-preview__btn weui-form-preview__btn_default" hover-class="weui-form-preview__btn_active" bindtap="cancelSel" hover-stay-time="50">取消button> <button class="weui-form-preview__btn weui-form-preview__btn_primary" hover-class="weui-form-preview__btn_active" bindtap="selModel" hover-stay-time="50">确认button>
            view>
            <picker-view indicator-style="height: 50px;" class="cal-num_model_sel" style="width: 100%; height: 450rpx;font-size:40rpx;" value="{{pValue}}" bindchange="pickerChange">
                <block wx:for="{{fModel.cols}}" wx:for-item="options">
                <picker-view-column>
                    <view wx:for="{{options}}" wx:for-item="option" style="line-height: 50px">{{option.name}}view>
                picker-view-column>
                block>
            picker-view>
        view>
     
    view>


    2017-08-03
    有用
    回复
  • Jamin
    Jamin
    2017-08-03

    提供一下代码?

    2017-08-03
    有用
    回复
登录 后发表内容