Getting Started - Light
The fastest way to get started, is to use one of the prebuilt components.
- cron-core - renderless cron editor
- cron-light - lightweight cron editor without external dependencies
- cron-ant - cron editor for Ant Design Vue
- cron-element-plus - cron editor for Element Plus
- cron-naive - cron editor for Naive UI
- cron-prime - cron editor for PrimeVue
- cron-quasar - cron editor for Quasar
- cron-vuetify - cron editor for Vuetify.js
Installation
Open up a terminal and run the following command:
yarn add @vue-js-cron/light
or
npm install @vue-js-cron/light
Then you need to register the component
import '@vue-js-cron/light/dist/light.css'
// registers the component globally
// registered name: CronLight
import CronLightPlugin from '@vue-js-cron/light'
app.use(CronLightPlugin)
// alternatively you can also register the component yourself
// https://vuejs.org/guide/components/registration.html
import { CronLight } from '@vue-js-cron/light'
app.component('CronLight', CronLight)
Done! 🚀
API
Example
<template>
<div class="pt-2">
<cron-light v-model="value" @error="error=$event"></cron-light>
<div class="text-lightest pt-2">cron expression: {{value}}</div>
</div>
</template>
<script>
export default {
data () {
return {
value: '* * * * *',
error: ''
}
}
}
</script>