Micro-channel applet - Component

1. FIG rotation

<swiper indicator-dots="{{indicatorDots}}" indicator-color="{{indicatorColor}}"
  indicator-active-color="{{indicatorActiveColor}}" autoplay="{{autoplay}}" interval="{{interval}}"
  duration="{{duration}}" circular="{{circular}}">
  <block wx:key="item" wx:for="{{imgUrls}}">
    <swiper-item>
      <image src="{{item}}" class="slide-image" />
    </swiper-item>
  </block>
</swiper>

parameter:
imgUrls:[],
indicatorDots: true,
indicatorColor: '#fff',
indicatorActiveColor: '# 666'
autoplay: true,
interval: 5000,
duration: 500,
circular: true,

  

2. Select the drop-down

(1) input box
<Input type = 'text' bindchange = 'changInput' placeholder = 'ZIP'> </ input>
(2) pull-down selection time
<picker bindchange="changInput" mode="date" value="{{postData.mail_time}}" start="2019-06-01" end="2020-09-01">
  <view class="picker">
    {{postData.mail_time}}
  </view>
</picker>
(3) drop-down selection item, range-key data only parse the layer below
<picker bindchange="changInput" value="{{indexPerson}}" range="{{arrayPerson}}" range-key="zh_name">
  <view class="picker">
    {{ArrayPerson [indexPerson] || 'Please select the number of'}}
  </view>
</picker>

When the change in input box, to a method changInput processing value is determined according to transmission over id
<script>
  changInput(e) {
    let id = e.currentTarget.dataset.id
    let value = e.detail.value
    if (id === 1) {
      this.setData({
        value: value
      })
    }
  }
</script>

  

 

Guess you like

Origin www.cnblogs.com/fm060/p/11014747.html