vue-cron-editor .VueCronEditor is a component library built with Vue allowing for easier editing of CRON expressions.
https://karoletrych.github.io/vue-cron-editor/
There are currently two versions available:
npm install vue-cron-editor-buefy --save
<v-app>
element.npm install vue-cron-editor-vuetify --save
<template>
<v-app>
<v-content>
<VueCronEditorBuefy v-model="cronExpression"/>
{{cronExpression}}
</v-content>
</v-app>
</template>
<script>
import VueCronEditorBuefy from 'vue-cron-editor-buefy';
export default {
name: 'App',
components: {
VueCronEditorBuefy
},
data: () => ({
cronExpression: "*/1 * * * *"
}),
};
</script>
The editor tab will be set to one which is able to represent an initial expression given to a value
prop (minutes tab in the example above). If none of the tabs can represent the given expression then advanced tab is selected.
The language of the component can be selected with the locale
prop.
<VueCronEditorBuefy
v-model="expression"
locale="pl"
></VueCronEditorBuefy>
Currently supported languages:
Custom locales can be provided via a customLocales
prop:
<VueCronEditorBuefy
v-model="expression"
locale="test"
:custom-locales="{
test: {
every: "Every",
minutes: "minute(s)",
hoursOnMinute: "hour(s) on minute",
daysAt: "day(s) at",
at: "at",
onThe: "On the",
dayOfEvery: "day of every",
monthsAt: "month(s) at",
everyDay: "Every",
mon: "Mon",
tue: "Tue",
wed: "Wed",
thu: "Thu",
fri: "Fri",
sat: "Sat",
sun: "Sun",
hasToBeBetween: "Has to be between",
and: "and"
}
}"
></VueCronEditorBuefy>
To build the demo/samples app run in root directory:
npm install
npm run serve
For testing the built packages:
npm install
cd src/vuetify
npm run pack
cd ../buefy
npm run pack
cd ../../test_app
npm install
npm run serve
Author: karoletrych
Live Demo: https://karoletrych.github.io/vue-cron-editor/
GitHub: https://github.com/karoletrych/vue-cron-editor
#vuejs #javascript #vue-js