1.0.2 • Published 8 years ago

eglass-wx-calendar v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 years ago

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

说明

由于微信小程序没有日历组件,而很多项目中经常用到,特此封装

此组件依赖于wepyjsmomentjs, underscorejs

依赖

wepyjs

npm install wepy-cli -g

momentjs

npm install moment --save

underscorejs

npm install underscore --save

安装组件

npm install eglass-wx-calendar

引入组件

// index.wpy
<template>
  <view class="calendarBack" wx:if="{{showCalendar}}"></view>
  <view class="calendar" wx:if="{{showCalendar}}">
    <Calendar @childConfirm.user="parentConfirm" @childCancel.user="parentCancel"></Calendar>
  </view>
</template>
<script>
    import wepy from 'wepy';
    import calendar from 'eglass-wx-calendar';

    export default class Index extends wepy.page {
        components = {
            calendar
        }
        methods = {
          async parentConfirm (time, e) {
            this.showCalendar = false
            this.remindTime = ''
            this.currentDate = time
          },
          parentCancel (time, e) {
            this.showCalendar = false
          }
        }
    }
</script>

下个版本

目前这个版本还不够定制化,下个版本将优化这块,敬请期待

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago