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

antd-vue-cron

v1.0.0

Published

## 依赖 - Vue 2.0.0+ - ant-design-vue 1.7.8+

Readme

antd-vue-cron

依赖

  • Vue 2.0.0+
  • ant-design-vue 1.7.8+

image

安装方式

npm install vue-cron

引入方式

//前置配置
import Vue from 'vue';
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';


Vue.use(Antd);


//全局引入
import AntdVueCron from 'vue-cron'
Vue.use(AntdVueCron);//使用方式:<vueCron></vueCron>


//局部引入
<template>
  <div id="app">
    <!-- <img alt="Vue logo" src="./assets/logo.png"> -->
    <a-input
      v-model="expression"
      disabled
      style="width:350px"
    >
      <span
        slot="addonAfter"
        type="primary"
        @click="showModal"
        style="cursor: pointer;"
      >
      显示corn
      </span>
    </a-input>
    <a-modal
      title="corn 表达式"
      v-model="visible"
      :footer="null"
      width="800px"
      destroyOnClose
    >
      <antd-vue-cron
        i18n="cn"
        :expression="expression"
        @change="handlerChange"
        @close="visible = false"
      />
    </a-modal>
  </div>
</template>


<script>
import Vue from 'vue'
import { Input, Modal } from 'ant-design-vue'
import { cron } from '@/components/index'


Vue.use(Modal)
export default {
  name: 'App',
  components: {
    'antd-vue-cron': cron,
    'a-input': Input,
    // 'a-icon': Icon,
    // 'a-button': Button
  },
  data () {
    return {
      visible: false,
      expression: '0 0 0 1 1 ? *'
    }
  },
  methods: {
    showModal () {
      this.visible = true
    },
    handlerChange (expression) {
      console.log('handlerChange', expression)
      this.expression = expression
      this.visible = false
    }
  }
}
</script>


<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>

参数

  • i18n

    • 参数 {String} language 目前仅支持en|cn

    国际化支持

事件

  • change(cronText)

    • 参数:{String} cronText cron表达式的值

    当corn表达式的值发生变化变化时触发

  • close()

    • 参数:无

    当点击corn表达式选择框取消按钮时触发

有任何问题请发Issues,欢迎pull request 谢谢!

此库为学习使用,参考了同类的库 vue-cron