0.0.4 • Published 4 years ago

@hyhello/vue-cron v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Quick start

@hyhello/vue-cron

The @hyhello/vue-cron component for vue2, supports single page applications.

Examples

codepen.io

Use Setup

install @hyhello/vue-cron

npm install @hyhello/vue-cron --save

Vue mount

// global use
import Vue from 'vue';
import vueCron from '@hyhello/vue-cron';

Vue.use(vueCron);

// or Local use
import { Cron } from '@hyhello/vue-cron';

export default {
    components: { Cron }
};

Use in SPA

<style>
	html,
	body {
		width: 100%;
		height: 100%;
		margin: 0;
		padding: 15px;
		text-align: center;
	}
</style>
<template>
	<vue-cron v-model="value" @change="change"></vue-cron>
</template>
<script>
	import { Cron as vueCron } from '@hyhello/vue-cron';

	export default {
		components: { vueCron },
		data: function () {
			return {
				value: null
			};
		},
		methods: {
			change(val) {
				console.log('value:', val);
			}
		}
	};
</script>

Api

参数说明类型可选值默认值
value/v-model需要绑定的值string-
disabled是否禁用booleantrue / falsefalse
readonly是否只读booleantrue / falsefalse

Events

事件名说明回调参数
change监听值变化变化后的值
0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago