Giter Club home page Giter Club logo

vue-schedule's Introduction

vue-schedule

Vue.js file schedule component

install

npm install vue-schedule --save

Example

http://jayzou.github.io/demo/vue-schedule/index.html

	<div id="app">
		<Schedule 
			:time-ground="['09:00', '18:00']" 
			:week-ground="['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday']" 
			:task-detail="[
				[
					{
						dateStart: '09:30',
						dateEnd: '10:30',
						title: '开会',
					},
					{
						dateStart: '11:30',
						dateEnd: '13:50',
						title: '开会',
					}
					
				]
			]">
				
		</Schedule>
	</div>

CommonJS

	var Vue = require('vue');
	var Schedule = require('vue-schedule');
	new Vue({
	    el: '#app',
	    components: {
	        Schedule: Schedule,
	    }
	})

ES6

	import Vue from 'vue';
	import Schedule from 'vue-schedule';
	new Vue({
	    el: '#app',
	    components: {
	        Schedule: Schedule,
	    }
	})

props

time-ground: 时间范围
示例

	:time-ground="['09:00', '18:00']" 

week-ground: 星期
示例

	:week-ground="['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday']" 

color: 颜色填充
示例

	:color="['#2B2E4A','#521262','#903749','#53354A','#40514E','#537780']" 

task-detail: 具体事项,具体事项需要与星期对应
示例

	:task-detail = "
		[ 
			[
				{
				    dateStart: '09:30',
				    dateEnd: '10:30',
				    title: 'Metting',
				    detail: 'Metting (German: Mettingen) is a commune in the Moselle department in Grand Est in north-eastern France.'
				}, 
				{
				    dateStart: '11:30',
				    dateEnd: '13:50',
				    title: 'Metting',
				    detail: 'Metting (German: Mettingen) is a commune in the Moselle department in Grand Est in north-eastern France.'
				}
			
			], 
			[
				{
				    dateStart: '10:30',
				    dateEnd: '12:00',
				    title: 'Metting',
				}, 
				{
				    dateStart: '12:30',
				    dateEnd: '14:50',
				    title: 'Metting',
				}
			
			], 
			[
				{
				    dateStart: '12:30',
				    dateEnd: '13:30',
				    title: 'Metting',
				}, 
				{
				    dateStart: '15:30',
				    dateEnd: '16:50',
				    title: 'Metting',
				}
			
			], 
			[
				{
				    dateStart: '09:50',
				    dateEnd: '10:50',
				    title: 'Metting',
				}, 
				{
				    dateStart: '11:30',
				    dateEnd: '13:50',
				    title: 'Metting',
				}
				
			],
			[
				{
				    dateStart: '12:30',
				    dateEnd: '13:30',
				    title: 'Metting',
				}, 
				{
				    dateStart: '14:30',
				    dateEnd: '15:50',
				    title: 'Metting',
				}
			
			]
		]
	"

change log

vue1.x

vue-schedule's People

Contributors

jayzou avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.