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 🙏

© 2026 – Pkg Stats / Ryan Hefner

zeero-calendar

v1.1.9

Published

简易的日历日期插件

Readme

安装:

  npm install zeero-calendar --save 

全局引用或在使用页面引入

  import ZeeroCalendar from 'zeero-calendar' 

在页面注册使用

  export default {
    components: { 
      ZeeroCalendar 
    }, 
    data () { 
      return { 
        scope:'',
        evocation:false 
      }
    } 
  } 

这样可以在页面中添加HTML 标签

  <ZeeroCalendar :zcbox='ptt' :inputname="selectinput" @zeerodate="setdata"> 

事件说明:

zcbox 这个需要传送需要使用日期的输入框的OBJECT信息回到插件中

如何获取输入框input的object?

在需要获得日期的输入框 增加 $ref 并添加输入框的点击 或者焦点事件(推荐点击)

例如:@click="demo()" 具体看下面的两个示例

示例:

1、(外部点击打开) <div class="dateicon" @click="demo()">

2、输入框点击打开 <input type="text" ref="inputa" v-model="scope" @click="demo()"/>

在methods: 中定义点击函数事件

demo(){

  //使用时先获取需要插入的输入框的v-model名称

  this.selectinput='scope'
  
  //根据$ref来定位显示的位置

  let  st=new  Object(JSON.parse(JSON.stringify(this.$refs.inputa.getBoundingClientRect())))

  this.ptt=st//把定位传给子组件

  this.evocation=true//显示出来 然后执行自定义点击事件setdata 通过判断nm来识别val 插入的输入框是哪个

} 

插件上的自定义函数事件会给与你需要的日期

继续在函数里定义一个 setdata(val,nm) 带参函数事件

setdata(val,nm){
	if(nm=='scope'){
		this.scope=val
	}
	this.evocation=false
}

val 是日期; nm 是需要给那个input 的 v-model 如果有多个输入框使用在此判断就好了,可以使用switch case……

完整的demo

<template>
  <div class="hello">
    <zeeroCalendar v-if="evocation" :zcbox='ptt' :inputname="selectinput" @zeerodate="setdata"></zeeroCalendar>
    <input type="text" ref="inputa" v-model="scope" @click="demo()"/>
  </div>
</template>

<script>
import zeeroCalendar from 'zeero-calendar'
export default {
  components: { 
    zeeroCalendar 
  },
  data () {
    return {
      scope:'',
      evocation:false,
      ptt:Object(),
      selectinput:""
    }
  },
  methods: {
    demo(){
      this.selectinput='scope'
      let  st=new  Object(JSON.parse(JSON.stringify(this.$refs.inputa.getBoundingClientRect())))
      this.ptt=st
      this.evocation=true
    },
    setdata(val,nm){
      if(nm=='scope'){
          this.scope=val
      }
      this.evocation=false
    }
  }
}
</script>
<style scoped>
</style>