npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wepy-calendar

v0.1.2

Published

wepy 日历组件

Downloads

5

Readme

微信小程序 wepyjs 第三方 日历组件

toast

说明

基本实现功能:

  1. 日历显示
  2. 选择时间
  3. 打卡日期

使用

拷贝到components里

npm install wepy-calendar --save

##引入 import wepyCalendar from 'wepy-calendar'

引入组件

// index.wpy
<template>
    <wepyCanlendar></wepyCanlendar>
</template>
<script>
    import wepy from 'wepy';
    import wepyCanlendar from '@/components/calendar'

    export default class Index extends wepy.page {
        components = {
            wepyCanlendar
        };
    }
    
</script>

自定义参数

// index.wpy
<template>
    <wepyCanlendar 
        :currentDate.sync="currentDate" // 日历当前时间 默认为今天
        :startDate.sync="startDate" // 日历选择器picker的最小时间 默认为3年之前
        :endDate.sync="endDate" // 日历选择器picker的最大时间 默认为3年之后
        :hasIconList.sync="hasIconList" // 日历中显示的天数数组
        :moduleId.sync="'step1Canlendar'" // 日历组件标识,用于同一页面引用多个插件区分,单个跳过不用设置。
    ></wepyCanlendar>
</template>
<script>
    import wepy from 'wepy'
    import wepyCanlendar from '@/components/calendar'

    export default class Index extends wepy.page {
        components = {
            wepyCanlendar
        };
        
        onLoad(){
            this.$broadcast("startRenderCalendar");//通知日历组件可以开始渲染
        }
        
        data = {
              currentDate: "2018-08-09",
              startDate: '2018-01-01',
              endDate: '2018-02-01',
              hasIconList:[ '2018-06-01', '2018-06-06', '2018-06-09', '2018-06-10', '2018-06-15' ]
        };  // 页面所需数据均需在这里声明,可用于模板数据绑定
        
        events = {
              calChangeCurrentMonth:function (date,moduleId,e) {
                 //日历当前月份改变回调
                 //单个用例只需用到date
                 //多个用例是通过传回来的moduleId去判断是那个用例,从而操作不懂逻辑:
                 //if(moduleId=='xxxx'){
                 //     
                 // }else{
                 // }
              },
              calChangeSelectedDay:function (date,moduleId,e) {
                //日历当前月份改变回调
                                 //单个用例只需用到date
                                 //多个用例是通过传回来的moduleId去判断是那个用例,从而操作不懂逻辑:
                                 //if(moduleId=='xxxx'){
                                 //     
                                 // }else{
                                 // }
              }
            };  // 声明组件之间的事件处理函数
    }
    
</script>

| 属性/方法 | 必填 | 默认值 |备注| | -------- | ----- | ---- |---- | | moduleId | 否 | '' |字符串,用于多案例时区分,单案例忽略| | currentDate | 否 | new Date() |日历当前时间| | startDate 否 | null |日历时间选择picker最小时间| | endDate | 否 | null |日历时间选择picker最大时间| | hasIconList | 否 | [] |日历显示天数组| | calChangeCurrentMonth | 否 | (date,e) |日历当前月份改变回调 | calChangeSelectedDay | 否 | (date,e) |声明组件之间的事件处理函数 | this.$broadcast("startRenderCalendar"); | 是 | ‘’ |通知组件可以开始渲染

@MIT LICENSE