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-one-line-calendar

v1.0.1

Published

wepy calendar

Downloads

8

Readme

wepy-one-line-calendar

wepy calendar on-line-calendar 日历组件 单行日历组件

效果图

在线小程序码

使用

方法一

觉得样式还可以的话

/*********
* 安装
*********/
npm i wepy-one-line-calendar --save
/*********
* 使用
*********/

<template>
  <calendar></calendar>
</template>

<script>
  import wepy from 'wepy'
  import calendar from 'wepy-one-line-calendar'
    export default class Index extends wepy.page {
        components = {
          calendar: calendar
        }
    }
</script>

方法二

自己改造日历

  1. 复制本项目下的src/components/calendar.wpy文件, 放到你自己的项目下。
  2. calendar.wpy下面的注释写的很详细了, 遇到问题, 欢迎骚扰。

组件的emit事件, props属性, slot

emit事件

| 事件 | 解释 | | ------------- |:-------------:| | selectDay | 点击日期时触发 | | selectMonth | 选择年或者月份触发 | | userDefineTap | 自定义的slot被tap时触发 |

props属性

| 属性 | 解释 | | ------------- |:-------------:| | scheduleNumOfDay | 日期右上角标数字 [{day: '2018-12-10', num: 4}]|

slot

<slot name="slot"></slot>

实例

结合emit, props, slot的实例

<template>
      <Calendar @userDefineTap.user="add" @selectDay.user="selectDay" :scheduleNumOfDay.sync="scheduleNumOfDay">
        <i class="iconfont icon-add" slot="slot"></i>
      </Calendar>
</template> 
<script>
  import wepy from 'wepy'
  import calendar from 'wepy-one-line-calendar'
    export default class Index extends wepy.page {
        components = {
          calendar: calendar
        }
        data = {
          scheduleNumOfDay: [{day: '2018-12-30', num: 5}]
        }
        methods = {
          add(){
            // slot click
          },
          selectDay(dayItem){
            // select day
          }
        }
    }
</script>     

最后

欢迎star,pr