Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eglass-wx-picker

clarence.zhi6MIT1.0.0

一款好用的微信pickerView组件

pickerView

readme

微信小程序 wepyjs 第三方eglass-wx-picker组件

说明

由于微信小程序picker组件样式定制化程度不高,而很多项目中经常用到不同的样式,特此封装

此组件依赖于wepyjs

安装组件

npm install eglass-wx-picker

引入组件

// index.wpy
<template>
  <PickerView
      :showPickerView.sync="showPickerView"
      confirmTextColor="#47AFCB"
      @pickerViewConfirm.user="handlePickerViewConfirm">
      <picker-view-column slot="pickerViewColumn">
        <view class="picker-view"
              wx:for="{{usage}}"
              wx:key="{{item}}"
              style="line-height: 34px">
              {{item}}
        </view>
      </picker-view-column>
  </PickerView>
</template>
<script>
    import wepy from 'wepy';
    import PickerView from 'eglass-wx-picker';

    export default class Index extends wepy.page {
        components = {
              PickerView: PickerView
            }
        data = {
          showPickerView: false,
          usage: ['远用', '近用', '隐形', '多焦点']
        }
        methods = {
          handlePickerViewConfirm(value) {
            this.current = value[0]
            this.showPickerView = false
            ....
          }
        }
    }
</script>

更多惊喜请查看组件实现