1.0.4 • Published 3 years ago

vue-resource-timeline v1.0.4

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

vue-resource-timeline

A simple component to show timeline of events categorized by resources.

Install

npm install --save vue-resource-timeline

Use as a plugin -

import Vue from 'vue';
import ResourceTimeline from 'vue-resource-timeline';

Vue.use(ResourceTimeline); // Adds 'resource-timeline' component

or directly use as a component

import ResourceTimeline from 'vue-resource-timeline';

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

Props -

PropDescriptionTypeDefault
resources*Array of resourcesArray
events*Array of eventsArray
showEmptyResourceToggle showing of resources with no eventsBooleanfalse
showAddBtnToggle showing add buttonBooleanfalse

events expects the following format -

const events = [{
  resourceId: String/Number, // Strictly matches the value of a resource.id
  start: String, // 'HH:mm'
  end: String, // 'HH:mm'
  class: String, // Optional
  title: String, // Optional
}];

resources expects the following format -

const resources = [{
  id: String/Number, // Strictly matches the value of a resource.id
  class: String, // Optional
  title: String, // Optional
}];

Events -

EventDescriptionPayload
addBtnClickEmitted when the + button is clickedNumber, day of add button that was clicked
eventClickEmitted when an event is clickedObject, original 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

1.0.4

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago