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

vue-el-datepicker

v1.1.0

Published

仿element-ui日期选择器弹窗部分

Downloads

274

Readme

vue-el-datepicker

仿element-ui日期选择器弹窗部分组件

起因

由于某些业务要求,需要用到element时间选择器样式的同时不希望它是弹窗的模式,但是element-ui并没有提供一个单独的选择日期组件,因此开发了这个组件,组件逻辑部分大部分参考element-ui date-picker 源码部分。

样式

示例图片

安装

npm install --save vue-el-datepicker

用法


<template>
  <div id="app">
    
    <p>{{date}}</p>

    <date-picker 
      ref="date"
      v-model="date"
      type="week"
      separator="-"
      @getValue="getTime"
    />

  </div>
</template>

<script>
import datePicker from 'vue-el-datepicker'
export default {
  data(){
    return {
      date: '2020-01-08',
    }
  },
  components: {
    datePicker
  },
  methods:{
    getTime(time){
      console.log(time)
      console.log(time.date)
      
    }
  }
}
</script>

Props

Prop|Type|Default|Description ---|:--:|---:|--- customClass| String| null | 弹窗的样式包含遮罩层在内样式均可重写 separator | String | "-" | 分隔符,默认为 "-" ,确认分隔符后传入的所有时间以及输出的时间,都将按照分隔符风格, 入分隔符设定为 "/" 则输入出时间为 "2019/04/05" 格式,同时传入的 value 等参数也将使用分隔符的格式传入 type | String | "date" | "date"/"week"/"month"/"year", 同 element-ui datepicker组件 getValue | Function(val) | null | 点击触发,根据type不同返回不同内容