欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

微信小程序picker組件下拉框選擇input輸入框的實例

 更新時間:2017年09月20日 10:28:51   作者:今天一點也不冷  
這篇文章主要介紹了微信小程序picker組件下拉框選擇input輸入框的實例的相關(guān)資料,希望通過本文能幫助到大家,需要的朋友可以參考下

微信小程序picker組件下拉框選擇input輸入框的實例

實現(xiàn)效果圖:

頁面

<view class="row-wrap">
     <view class="label">預(yù)約項目</view>
     <picker bindchange="bindCasPickerChange" value="{{casIndex1}}" range="{{casArray}}">
      <view>
       <text>{{casArray[casIndex]}}</text>
      </view>

     </picker>
    </view>

   </view>
<view class="section {{reply?'on':'off'}}">
    <input name="other" placeholder="請輸入所預(yù)約項目" type="text"/>
  </view>

js

data: {
  nickName: "",
  avatarUrl: "",
  casArray: ['雙眼皮', 'TBM', '隆胸', '減肥', '手動輸入'],
  userName: '',
  mobile: '',
  Gender: 'female',
  casIndex: 0,
 },

 /**
 * 生命周期函數(shù)--監(jiān)聽頁面加載
  */

 bindCasPickerChange: function (e) {
  console.log('喬丹選的是', this.data.casArray[e.detail.value])
  if (e.detail.value == 4) {
   this.setData({ reply: true })
  } else {
   this.setData({ reply: false })
  }
  this.setData({
   casIndex: e.detail.value
  })

 },

添加input框的樣式

.section{
   font-size:28rpx;
   margin-left: 50rpx;
   margin-top: 30rpx;
  }
  .on{display: block}
  .off{display: none}

如有疑問請留言或者到本站社區(qū)交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!

相關(guān)文章

最新評論