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

time_check_jiangji

v1.0.3

Published

一个vue的滑动(时间)选择器

Readme

一个vue的滑动选择器(移动端和PC端都能使用)

先来张效果图

1

安装 npm install time_check_jiangji

引入 import Time from 'time_check_jiangji'

直接上干货,demo

<template>
  <div class="App">
    <div @click="timeShow = true">点击显示Time组件</div>
    <Time v-if="timeShow" :cancleFn="cancleFn" :time="true" :defaultValue="[2019, 6, 5, '上午', '随便2']"  :arr="[['上午', '下午'], ['随便1', '随便2']]" @click="clickFn" :arrayFirstdayAndLastday="['2012.6.8', '2019.6.10']" :stylBtn="{'color': '#00ffff'}" />
  </div>
</template>

<script>
import Time from 'time_check_jiangji'
export default {
  name: 'App',
  components: {
    Time
  },
  data() {
    return {
      timeShow: true
    };
  },
  methods: {
    clickFn (e) {
      console.log(e)
      this.timeShow = false
    },
    cancleFn () {
      console.log('取消')
      this.timeShow = false
    }
  }
};
</script>

下面再来一个说明

@click="clickFn"
是点击确认按钮的触发的函数 接受一个参数(数组类型),是当前的值
(例如[2019, 6, 5, "上午", "随便2"])

:cancleFn="cancleFn"  (特别注意,是:cancleFn不是@cancleFn,是: 不是@)
是点击取消按钮触发的函数,不传则不显示取消按钮(非必传)

:defaultValue="[2019, 6, 5, "上午", "随便2"]"
是回显值(一维数组,非必传,传了能回显)  数据类型注意要对应上

:time="true"
开启年月日的时间选择模式(只能选择三年内的日期,非必传)

:arr="[['上午', '下午'], ['随便1', '随便2']]"
传入二维数组(非必传)
如果:time="true" 那么前三列是时间(年月日),第四列是['上午', '下午'],第五列是['随便1', '随便2']
如果:time="false"或者未传, 第1列是['上午', '下午'],第2列是['随便1', '随便2']

:arrayFirstdayAndLastday="['2016.6-8', '2019-6.10']" (日期用逗号(.)或者一杠(-)隔开都行)
arrayFirstdayAndLastday是一维数组,数组长度必须是2,数组长度必须是2,数组长度必须是2
第一项是最早的显示时间,第二项是最晚的显示时间
['2016.6.8', '2019.6.10'] 那么最早显示时间是2016年6月8号,最晚时间是2019年6月10号

:stylBtn="{'color': '#00ffff'}"
是按钮这一栏的行内样式