├── .babelrc ├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── build └── cron.min.js ├── config ├── cooking.build.js └── cooking.dev.js ├── dist ├── app.ce15cda.js └── index.html ├── language ├── cn.js ├── en.js ├── index.js └── pt_br.js ├── package-lock.json ├── package.json ├── src ├── index.js └── index.vue └── test ├── index.js ├── index.tpl └── test.vue /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015", "stage-0", "stage-2"], 3 | "comments": false, 4 | "env": { 5 | "production": { 6 | "plugins": [ 7 | ["transform-runtime", { "polyfill": false, "regenerator": false }] 8 | ] 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | npm-debug.log 4 | lerna-debug.log 5 | npm-debug.log.* 6 | lerna-debug.log.* 7 | .idea 8 | .npmrc 9 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | /* 2 | !/src 3 | !/build 4 | !README.md 5 | !package.json 6 | !LICENSE 7 | !package-lock.json 8 | 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Jack(1615450788) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-cron 2 | 3 | ![CocoaPods](https://img.shields.io/npm/dt/vue-cron.svg) 4 | ![CocoaPods](https://img.shields.io/npm/v/vue-cron.svg) 5 | 6 | 7 | 这是一个cron表达式生成插件,基于vue与element-ui实现 8 | [demo](https://1615450788.github.io/vue-cron/dist/index) 9 | 10 | 11 | ## 依赖 12 | - Vue 2.0.0+ 13 | - element-ui 2.0.0+ 14 | 15 | ## 安装方式 16 | ``` 17 | npm install vue-cron 18 | ``` 19 | 20 | ## 引入方式 21 | ```javascript 22 | //前置配置 23 | import Vue from 'vue' 24 | import ElementUI from 'element-ui'; 25 | import 'element-ui/lib/theme-chalk/index.css' 26 | Vue.use(ElementUI); 27 | 28 | //全局引入 29 | import VueCron from 'vue-cron' 30 | Vue.use(VueCron);//使用方式: 31 | 32 | //局部引入 33 | import {cron} from 'vue-cron' 34 | 35 | export default { 36 | template: '', 37 | components: { cron } 38 | } 39 | ``` 40 | 41 | ## 示例 42 | ```vue 43 | 52 | 53 | 71 | ``` 72 | 73 | 在示例中我使用了es6(es2015)语法,你可能需要引入babel-polyfill才能正常运行,或者你也可以用es5的写法 74 | 75 | ## 参数 76 | 77 | - i18n 78 | 79 | - 参数 `{String} language` 目前仅支持`en|cn` 80 | 81 | 国际化支持 82 | 83 | ## 事件 84 | - change(cronText) 85 | 86 | - 参数:`{String} cronText` cron表达式的值 87 | 88 | 当corn表达式的值发生变化变化时触发 89 | 90 | - close() 91 | 92 | - 参数:无 93 | 94 | 当点击corn表达式选择框取消按钮时触发 95 | 96 | ## 联系方式 97 | 98 | 邮箱 : 1615450788@qq.com 99 | 100 | 有任何问题请发Issues或者邮箱联系我-.- 谢谢! 101 | -------------------------------------------------------------------------------- /build/cron.min.js: -------------------------------------------------------------------------------- 1 | module.exports=function(e){function t(r){if(n[r])return n[r].exports;var a=n[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=15)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cron=void 0;var r=n(8),a=function(e){return e&&e.__esModule?e:{default:e}}(r);t.cron=a.default;t.default={install:function(e){e.component(a.default.name,a.default)}}},function(e,t){e.exports=require("babel-polyfill")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={Seconds:{name:"秒",every:"每一秒钟",interval:["每隔","秒执行 从","秒开始"],specific:"具体秒数(可多选)",cycle:["周期从","到","秒"]},Minutes:{name:"分",every:"每一分钟",interval:["每隔","分执行 从","分开始"],specific:"具体分钟数(可多选)",cycle:["周期从","到","分"]},Hours:{name:"时",every:"每一小时",interval:["每隔","小时执行 从","小时开始"],specific:"具体小时数(可多选)",cycle:["周期从","到","小时"]},Day:{name:"天",every:"每一天",intervalWeek:["每隔","周执行 从","开始"],intervalDay:["每隔","天执行 从","天开始"],specificWeek:"具体星期几(可多选)",specificDay:"具体天数(可多选)",lastDay:"在这个月的最后一天",lastWeekday:"在这个月的最后一个工作日",lastWeek:["在这个月的最后一个"],beforeEndMonth:["在本月底前","天"],nearestWeekday:["最近的工作日(周一至周五)至本月","日"],someWeekday:["在这个月的第","个"]},Week:["天","一","二","三","四","五","六"].map(function(e){return"星期"+e}),Month:{name:"月",every:"每一月",interval:["每隔","月执行 从","月开始"],specific:"具体月数(可多选)",cycle:["从","到","月之间的每个月"]},Year:{name:"年",every:"每一年",interval:["每隔","年执行 从","年开始"],specific:"具体年份(可多选)",cycle:["从","到","年之间的每一年"]},Save:"保存",Close:"关闭"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={Seconds:{name:"Seconds",every:"Every second",interval:["Every","second(s) starting at second"],specific:"Specific second (choose one or many)",cycle:["Every second between second","and second"]},Minutes:{name:"Minutes",every:"Every minute",interval:["Every","minute(s) starting at minute"],specific:"Specific minute (choose one or many)",cycle:["Every minute between minute","and minute"]},Hours:{name:"Hours",every:"Every hour",interval:["Every","hour(s) starting at hour"],specific:"Specific hour (choose one or many)",cycle:["Every hour between hour","and hour"]},Day:{name:"Day",every:"Every day",intervalWeek:["Every","day(s) starting on"],intervalDay:["Every","day(s) starting at the","of the month"],specificWeek:"Specific day of week (choose one or many)",specificDay:"Specific day of month (choose one or many)",lastDay:"On the last day of the month",lastWeekday:"On the last weekday of the month",lastWeek:["On the last"," of the month"],beforeEndMonth:["day(s) before the end of the month"],nearestWeekday:["Nearest weekday (Monday to Friday) to the","of the month"],someWeekday:["On the","of the month"]},Week:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Month:{name:"Month",every:"Every month",interval:["Every","month(s) starting in"],specific:"Specific month (choose one or many)",cycle:["Every month between","and"]},Year:{name:"Year",every:"Any year",interval:["Every","year(s) starting in"],specific:"Specific year (choose one or many)",cycle:["Every year between","and"]},Save:"Save",Close:"Close"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(3),s=r(a),c=n(2),i=r(c);t.default={en:s.default,cn:i.default}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=n(14),s=r(a),c=n(4),i=r(c);t.default={name:"vueCron",props:["data","i18n"],data:function(){return{second:{cronEvery:"",incrementStart:"3",incrementIncrement:"5",rangeStart:"",rangeEnd:"",specificSpecific:[]},minute:{cronEvery:"",incrementStart:"3",incrementIncrement:"5",rangeStart:"",rangeEnd:"",specificSpecific:[]},hour:{cronEvery:"",incrementStart:"3",incrementIncrement:"5",rangeStart:"",rangeEnd:"",specificSpecific:[]},day:{cronEvery:"",incrementStart:"1",incrementIncrement:"1",rangeStart:"",rangeEnd:"",specificSpecific:[],cronLastSpecificDomDay:1,cronDaysBeforeEomMinus:"",cronDaysNearestWeekday:""},week:{cronEvery:"",incrementStart:"1",incrementIncrement:"1",specificSpecific:[],cronNthDayDay:1,cronNthDayNth:"1"},month:{cronEvery:"",incrementStart:"3",incrementIncrement:"5",rangeStart:"",rangeEnd:"",specificSpecific:[]},year:{cronEvery:"",incrementStart:"2017",incrementIncrement:"1",rangeStart:"",rangeEnd:"",specificSpecific:[]},output:{second:"",minute:"",hour:"",day:"",month:"",Week:"",year:""}}},watch:{data:function(){this.rest(this.$data)}},computed:{text:function(){return i.default[this.i18n||"cn"]},secondsText:function(){var e="";switch(this.second.cronEvery.toString()){case"1":e="*";break;case"2":e=this.second.incrementStart+"/"+this.second.incrementIncrement;break;case"3":this.second.specificSpecific.map(function(t){e+=t+","}),e=e.slice(0,-1);break;case"4":e=this.second.rangeStart+"-"+this.second.rangeEnd}return e},minutesText:function(){var e="";switch(this.minute.cronEvery.toString()){case"1":e="*";break;case"2":e=this.minute.incrementStart+"/"+this.minute.incrementIncrement;break;case"3":this.minute.specificSpecific.map(function(t){e+=t+","}),e=e.slice(0,-1);break;case"4":e=this.minute.rangeStart+"-"+this.minute.rangeEnd}return e},hoursText:function(){var e="";switch(this.hour.cronEvery.toString()){case"1":e="*";break;case"2":e=this.hour.incrementStart+"/"+this.hour.incrementIncrement;break;case"3":this.hour.specificSpecific.map(function(t){e+=t+","}),e=e.slice(0,-1);break;case"4":e=this.hour.rangeStart+"-"+this.hour.rangeEnd}return e},daysText:function(){var e="";switch(this.day.cronEvery.toString()){case"1":break;case"2":case"4":case"11":e="?";break;case"3":e=this.day.incrementStart+"/"+this.day.incrementIncrement;break;case"5":this.day.specificSpecific.map(function(t){e+=t+","}),e=e.slice(0,-1);break;case"6":e="L";break;case"7":e="LW";break;case"8":e=this.day.cronLastSpecificDomDay+"L";break;case"9":e="L-"+this.day.cronDaysBeforeEomMinus;break;case"10":e=this.day.cronDaysNearestWeekday+"W"}return e},weeksText:function(){var e="";switch(this.day.cronEvery.toString()){case"1":case"3":case"5":e="?";break;case"2":e=this.week.incrementStart+"/"+this.week.incrementIncrement;break;case"4":this.week.specificSpecific.map(function(t){e+=t+","}),e=e.slice(0,-1);break;case"6":case"7":case"8":case"9":case"10":e="?";break;case"11":e=this.week.cronNthDayDay+"#"+this.week.cronNthDayNth}return e},monthsText:function(){var e="";switch(this.month.cronEvery.toString()){case"1":e="*";break;case"2":e=this.month.incrementStart+"/"+this.month.incrementIncrement;break;case"3":this.month.specificSpecific.map(function(t){e+=t+","}),e=e.slice(0,-1);break;case"4":e=this.month.rangeStart+"-"+this.month.rangeEnd}return e},yearsText:function(){var e="";switch(this.year.cronEvery.toString()){case"1":e="*";break;case"2":e=this.year.incrementStart+"/"+this.year.incrementIncrement;break;case"3":this.year.specificSpecific.map(function(t){e+=t+","}),e=e.slice(0,-1);break;case"4":e=this.year.rangeStart+"-"+this.year.rangeEnd}return e},cron:function(){return(this.secondsText||"*")+" "+(this.minutesText||"*")+" "+(this.hoursText||"*")+" "+(this.daysText||"*")+" "+(this.monthsText||"*")+" "+(this.weeksText||"?")+" "+(this.yearsText||"*")}},methods:{getValue:function(){return this.cron},change:function(){this.$emit("change",this.cron),this.close()},close:function(){this.$emit("close")},rest:function(e){for(var t in e)if(e[t]instanceof Object)this.rest(e[t]);else switch((0,s.default)(e[t])){case"object":e[t]=[];break;case"string":e[t]=""}}},mounted:function(){}}},function(e,t,n){t=e.exports=n(7)(),t.push([e.i,"#changeContab .language[data-v-2580bfa7]{position:absolute;right:25px;z-index:1}#changeContab .el-tabs[data-v-2580bfa7]{box-shadow:none}#changeContab .tabBody .el-row[data-v-2580bfa7]{margin:10px 0}#changeContab .tabBody .el-row .long .el-select[data-v-2580bfa7]{width:350px}#changeContab .tabBody .el-row .el-input-number[data-v-2580bfa7]{width:110px}#changeContab .bottom[data-v-2580bfa7]{width:100%;text-align:center;margin-top:5px;position:relative}#changeContab .bottom .value[data-v-2580bfa7]{font-size:18px;vertical-align:middle}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;tn.parts.length&&(r.parts.length=n.parts.length)}else{for(var c=[],a=0;a 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 |
15 | 16 |
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /language/cn.js: -------------------------------------------------------------------------------- 1 | export default { 2 | Seconds:{ 3 | name:'秒', 4 | every:'每一秒钟', 5 | interval:['每隔','秒执行 从','秒开始'], 6 | specific:'具体秒数(可多选)', 7 | cycle:['周期从','到','秒'] 8 | }, 9 | Minutes:{ 10 | name:'分', 11 | every:'每一分钟', 12 | interval:['每隔','分执行 从','分开始'], 13 | specific:'具体分钟数(可多选)', 14 | cycle:['周期从','到','分'] 15 | }, 16 | Hours:{ 17 | name:'时', 18 | every:'每一小时', 19 | interval:['每隔','小时执行 从','小时开始'], 20 | specific:'具体小时数(可多选)', 21 | cycle:['周期从','到','小时'] 22 | }, 23 | Day:{ 24 | name:'天', 25 | every:'每一天', 26 | intervalWeek:['每隔','周执行 从','开始'], 27 | intervalDay:['每隔','天执行 从','天开始'], 28 | specificWeek:'具体星期几(可多选)', 29 | specificDay:'具体天数(可多选)', 30 | lastDay:'在这个月的最后一天', 31 | lastWeekday:'在这个月的最后一个工作日', 32 | lastWeek:['在这个月的最后一个'], 33 | beforeEndMonth:['在本月底前','天'], 34 | nearestWeekday:['最近的工作日(周一至周五)至本月','日'], 35 | someWeekday:['在这个月的第','个'], 36 | }, 37 | Week:['天','一','二','三','四','五','六'].map(val=>'星期'+val), 38 | Month:{ 39 | name:'月', 40 | every:'每一月', 41 | interval:['每隔','月执行 从','月开始'], 42 | specific:'具体月数(可多选)', 43 | cycle:['从','到','月之间的每个月'] 44 | }, 45 | Year:{ 46 | name:'年', 47 | every:'每一年', 48 | interval:['每隔','年执行 从','年开始'], 49 | specific:'具体年份(可多选)', 50 | cycle:['从','到','年之间的每一年'] 51 | }, 52 | Save:'保存', 53 | Close:'关闭' 54 | } -------------------------------------------------------------------------------- /language/en.js: -------------------------------------------------------------------------------- 1 | export default { 2 | Seconds:{ 3 | name:'Seconds', 4 | every:'Every second', 5 | interval:['Every','second(s) starting at second'], 6 | specific:'Specific second (choose one or many)', 7 | cycle:['Every second between second','and second'] 8 | }, 9 | Minutes:{ 10 | name:'Minutes', 11 | every:'Every minute', 12 | interval:['Every','minute(s) starting at minute'], 13 | specific:'Specific minute (choose one or many)', 14 | cycle:['Every minute between minute','and minute'] 15 | }, 16 | Hours:{ 17 | name:'Hours', 18 | every:'Every hour', 19 | interval:['Every','hour(s) starting at hour'], 20 | specific:'Specific hour (choose one or many)', 21 | cycle:['Every hour between hour','and hour'] 22 | }, 23 | Day:{ 24 | name:'Day', 25 | every:'Every day', 26 | intervalWeek:['Every','day(s) starting on'], 27 | intervalDay:['Every','day(s) starting at the','of the month'], 28 | specificWeek:'Specific day of week (choose one or many)', 29 | specificDay:'Specific day of month (choose one or many)', 30 | lastDay:'On the last day of the month', 31 | lastWeekday:'On the last weekday of the month', 32 | lastWeek:['On the last',' of the month'], 33 | beforeEndMonth:['day(s) before the end of the month'], 34 | nearestWeekday:['Nearest weekday (Monday to Friday) to the','of the month'], 35 | someWeekday:['On the','of the month'], 36 | }, 37 | Week:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'], 38 | Month:{ 39 | name:'Month', 40 | every:'Every month', 41 | interval:['Every','month(s) starting in'], 42 | specific:'Specific month (choose one or many)', 43 | cycle:['Every month between','and'] 44 | }, 45 | Year:{ 46 | name:'Year', 47 | every:'Any year', 48 | interval:['Every','year(s) starting in'], 49 | specific:'Specific year (choose one or many)', 50 | cycle:['Every year between','and'] 51 | }, 52 | Save:'Save', 53 | Close:'Close' 54 | } -------------------------------------------------------------------------------- /language/index.js: -------------------------------------------------------------------------------- 1 | import en from './en' 2 | import cn from './cn' 3 | import pt from './pt_br' 4 | 5 | export default { 6 | en, 7 | cn, 8 | pt 9 | } -------------------------------------------------------------------------------- /language/pt_br.js: -------------------------------------------------------------------------------- 1 | export default { 2 | Seconds:{ 3 | name:'Segundos', 4 | every:'A cada segundo', 5 | interval:['A cada','segundo(s) começando no segundo'], 6 | specific:'Segundo específico (escolha um ou muitos)', 7 | cycle:['A Cada segundo entre segundos','e segundo'] 8 | }, 9 | Minutes:{ 10 | name:'Minutos', 11 | every:'A cada minuto', 12 | interval:['A cada','minuto(s) começando no minuto'], 13 | specific:'Minuto específico (escolha um ou muitos)', 14 | cycle:['A cada minuto entre minutos','e minutos'] 15 | }, 16 | Hours:{ 17 | name:'Horas', 18 | every:'A cada hora', 19 | interval:['A cada','hora(s) começando na hora'], 20 | specific:'Hora específica (escolha uma ou muitas)', 21 | cycle:['A cada hora entre horas','e horas'] 22 | }, 23 | Day:{ 24 | name:'Dia', 25 | every:'A cada dia', 26 | intervalWeek:['A cada','dia(s) começando em'], 27 | intervalDay:['A cada','dia(s) começando no','do mês'], 28 | specificWeek:'Dia específico da semana (escolha um ou vários)', 29 | specificDay:'Dia específico do mês (escolha um ou vários)', 30 | lastDay:'No último dia do mês', 31 | lastWeekday:'No último dia da semana do mês', 32 | lastWeek:['No último',' do mês'], 33 | beforeEndMonth:['dia(s) antes do final do mês'], 34 | nearestWeekday:['Dia da semana mais próximo (segunda a sexta) ao ','do mês'], 35 | someWeekday:['No','do mês'], 36 | }, 37 | Week:['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'], 38 | Month:{ 39 | name:'Mês', 40 | every:'A cada mês', 41 | interval:['A cada','mês(es) começando em'], 42 | specific:'Mês específico (escolha um ou muitos)', 43 | cycle:['Todo mês entre','e'] 44 | }, 45 | Year:{ 46 | name:'Ano', 47 | every:'Qualquer ano', 48 | interval:['A cada','ano(s) começando em'], 49 | specific:'Ano específico (escolha um ou muitos)', 50 | cycle:['Todo ano entre','e'] 51 | }, 52 | Save:'Salvar', 53 | Close:'Fechar' 54 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-cron", 3 | "version": "1.0.9", 4 | "description": "", 5 | "main": "build/cron.min.js", 6 | "scripts": { 7 | "dev": "cooking watch -p -c /config/cooking.dev.js", 8 | "dist": "cooking build -p -c /config/cooking.dev.js", 9 | "build": "cooking build -p -c /config/cooking.build.js", 10 | "npm": "npm run build && git add . && git commit -m build&& npm version patch && npm publish && git push && git push origin --tags" 11 | }, 12 | "author": "", 13 | "repository": { 14 | "type": "git", 15 | "url": "git@github.com:1615450788/vue-cron.git" 16 | }, 17 | "homepage": "https://1615450788.github.io/vue-cron/dist/index", 18 | "keywords": [ 19 | "cron", 20 | "vue", 21 | "vuecron" 22 | ], 23 | "license": "MIT", 24 | "bugs": { 25 | "url": "https://github.com/1615450788/vue-cron/issues" 26 | }, 27 | "dependencies": { 28 | "babel-runtime": "^6.26.0", 29 | "babel-polyfill": "^6.26.0", 30 | "element-ui": "^2.14.0", 31 | "vue": "^2.6.11" 32 | }, 33 | "devDependencies": { 34 | "hoek": "^5.0.3", 35 | "cooking": "^1.5.4", 36 | "cooking-autoprefixer": "^1.0.0", 37 | "cooking-cli": "^1.5.5", 38 | "cooking-less": "^1.0.5", 39 | "cooking-vue2": "^0.3.3", 40 | "vue-template-compiler": "^2.5.9", 41 | "webpack-node-externals": "^1.7.2" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import vueCron from './index.vue'; 2 | 3 | export let cron=vueCron; 4 | 5 | export default { 6 | install(Vue){ 7 | Vue.component(vueCron.name,vueCron) 8 | } 9 | } 10 | 11 | -------------------------------------------------------------------------------- /src/index.vue: -------------------------------------------------------------------------------- 1 | 36 | 278 | -------------------------------------------------------------------------------- /test/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import ElementUI from 'element-ui'; 3 | import cron from '../src'; 4 | import 'element-ui/lib/theme-chalk/index.css' 5 | import Test from '../test/test.vue'; 6 | 7 | Vue.use(cron); 8 | Vue.use(ElementUI); 9 | const isProd = process.env.NODE_ENV === 'production'; 10 | Vue.config.devtools = !isProd; 11 | Vue.config.silent = isProd; 12 | Vue.config.productionTip = false; 13 | 14 | const app = new Vue({ 15 | el: '#app', 16 | template: '', 17 | components: { Test } 18 | }); 19 | -------------------------------------------------------------------------------- /test/index.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <%= htmlWebpackPlugin.options.title %> 7 | 12 | 13 | 14 |
15 | 16 |
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /test/test.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 23 | 24 | --------------------------------------------------------------------------------