0.1.9 • Published 6 years ago

githubstyle-timeline v0.1.9

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

githubstyle-timeline

A timeline module like the github used for Vue

Demo

Visit there to view demo

Usage

First install from npm:

npm i githubstyle-timeline --save

Then import it in the vue file (always in the enter js):

import { TimeLine } from 'githubstyle-timeline';
import 'githubstyle-timeline/dist/github-timeline.css';

Vue.component(TimeLine.name, TimeLine);

Then you can use it:

<template>
    <time-line></time-line>
</template>

props

nameusagedefaultType
requestURLThe data URL of you(Attention: The data structure is show in the below)A mock URLString
yearOptionsThe years to be selected2018,2017,2016,2015Array
sizeThe size for the Module(one of 's','m','l')'l'String
autoScrollToTopIf scroll to the Top when change pagestrueBoolean
topPositionThe top offset when to scroll when change pages0Number

Data Structure

The data Structure is strict.

Request

The Default Request is a GET request, and the query in The URL contains begin(The begin timeStamp) and end(The end timeStamp).

Sending other query parameters is not yet supported, but will be supported later.

Response

The Response is in JSON format. You can find the format There

"content": {
    "begin": The begin timeStamp(same as the request),
    "beginDay": The ,
    "end": The end timeStamp(same as the request),
    "events": The events array
}    

Next feature

The current project has only the first small version and there are many things to be done next.

Next I hope to make it more customizable and more flexible. And I will take some measures to reduce the size of the bag

Attention

I use ElementUI2.0 for this module. Maybe there are some style problems if you use ElementUI 1.X

  • 0.1.9

Fix time string bug in Safari.

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago