Use of vue-cron plug-in
Recently, I used this in the project, and then I found some plug-ins, and found that this is still good and compatible with VUE, record it!
Plug-in installation
npm install vue-cron
Copy the code
Plug-in global reference
This is used with element-UI
import Vue from 'vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI);
// global import
import VueCron from 'vue-cron'
Vue.use(VueCron);
// Local import
import {cron} from 'vue-cron'
Copy the code
The sample
/ / Html
<el-popover v-model="cronPopover">
<vueCron @change="onChangeCron" @close="cronPopover = false"></vueCro
<el-input
slot="reference"
@click="cronPopover = true"
v-model="formData.triggerCron"
placeholder="Please enter a timing policy"
size="small"
></el-input>
</el-popover>
/ / js parts
methods: {
onChangeCron(v) {
this.formData.triggerCron = v
},
}
Copy the code
show
This paper addresses
NPM address www.npmjs.com/package/vue…