# vue-cron-generator
**Repository Path**: gduxj/vue-cron-generator
## Basic Information
- **Project Name**: vue-cron-generator
- **Description**: Cron Generator Implemented by Vue.js and Element-ui(基于Vue&Element-UI构建的在线Cron表达式生成器)
- **Primary Language**: JavaScript
- **License**: MIT
- **Default Branch**: master
- **Homepage**: https://ldang264.gitee.io/vue-cron-generator/dist/index.html
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 42
- **Created**: 2020-04-22
- **Last Updated**: 2020-12-18
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# vue-cron-generator
> a project using vue,element-ui to generate cron expression [中文](./README_zh_CN.md) [Online demo](https://ldang264.github.io/vue-cron-generator/dist/index.html)
**Used by**
>👉 Attemper: A distributed,multi-tenancy,job-flow scheduling application 👈
>>[Github](https://github.com/attemper/attemper)
>>[Gitee](https://gitee.com/attemper/attemper)

## Use(Example)
- Install dependency
``` bash
npm install vue-cron-generator
```
- [src/lang/index.js](https://github.com/attemper/attemper/blob/master/attemper-admin/src/lang/index.js)
``` typescript
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import elementEnLocale from 'element-ui/lib/locale/lang/en'
import elementZhCNLocale from 'element-ui/lib/locale/lang/zh-CN'
import enUSLocale from './en-US'
import zhCNLocale from './zh-CN'
import { getLocale } from '../util/tools'
Vue.use(VueI18n)
const messages = {
en_US: {
...enUSLocale,
...elementEnLocale
},
zh_CN: {
...zhCNLocale,
...elementZhCNLocale
}
},
i18n = new VueI18n({
// set locale
// options: en | zh
locale: getLocale(),
// set locale messages
messages
})
export default i18n
```
- [main.js](https://github.com/attemper/attemper/blob/master/attemper-admin/src/lang/index.js)
``` typescript
import Vue from 'vue'
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import 'vue-cron-generator/src/styles/global.less'
import App from './App'
import i18n from './lang' // Internationalization
Vue.use(Element, {
size: localStorage.getItem('size') || 'small', // set element-ui default size
i18n: (key, value) => i18n.t(key, value)
})
new Vue({
el: '#app',
i18n,
render: h => h(App)
})
```
- Vue file
``` vue
```
- Run your project
## Build Source Code
``` bash
# install dependencies
npm install vue-cron-generator
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
```