0.3.3 • Published 4 years ago

vue-weekly-schedule v0.3.3

Weekly downloads
11
License
GPL-3.0
Repository
-
Last release
4 years ago

vue-weekly-schedule

A simple component to show a repeating weekly schedule.

Install

npm install --save vue-weekly-schedule

Use as a plugin -

import Vue from 'vue';
import WeeklySchedule from 'vue-weekly-schedule';

Vue.use(WeeklySchedule); // Adds 'weekly-schedule' component

or directly use as a component

import WeeklySchedule from 'vue-weekly-schedule';

export default {
  components: {
    WeeklySchedule,
    ...
  },
  ...
};

Props -

PropDescriptionTypeDefault
schedules*Array of schedulesArray
eventClassA class you want to attach to each eventString''
showEmptyDaysToggle showing days which don't have any events to themBooleanfalse
showAddBtnToggle showing add buttonBooleanfalse
maxEventsToggle disabling add button after a max number of events is addedNumber0
showLegendShow legend for the calendarsBooleanfalse

schedules expects the following format -

  const schedules = [{
    name: String,
    class: String,
    events: [
      {
        day: Number,
        startTime: String, // 'HH:mm'
        endTime: String, // 'HH:mm'
        class: String,
      },
    ],
  }];

The class is added to each event of the schedule.

Events -

EventDescriptionPayload
addBtnClickEmitted when the + button is clickedNumber, day of add button that was clicked
eventClickEmitted when an event is clickedObject, event object for the clicked event

Development setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Run your tests

npm run test

Lints and fixes files

npm run lint

License

MIT

0.3.3

4 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago