1.0.12 • Published 3 years ago

time-axis-scroll v1.0.12

Weekly downloads
2
License
ISC
Repository
github
Last release
3 years ago

A time axis plugin that can move left and right and adjust page width. The plugin works with CommonJS, AMD and as global variable.

一款可以左右移动而且自适应页面宽度的时间轴插件。该插件可以在CommonJS, AMD引入,也可以在global下使用。(该插件基于Big peach写的jQuery时间轴插件TimeAxis改造)

image

demo

Installation

> npm install time-axis-scroll --save

Usage

<template>
  <div class="cx-time-main" id="cxTime"></div>
</template>

<script>
import TimeAxis from "time-axis-scroll";

export default {
  name: "HelloWorld",
  props: {
    msg: String
  },
  mounted() {
    const timeList = [
      { name: "第一次", time: "2019-11-01" },
      { name: "第二次", time: "2019-11-02" },
      { name: "第三次", time: "2019-11-03" },
      { name: "第四次", time: "2019-11-04" },
      { name: "第五次", time: "2019-11-05" },
      { name: "第六次", time: "2019-11-06" },
      { name: "第七次", time: "2019-11-07" },
      { name: "第八次", time: "2019-11-08" },
      { name: "第九次", time: "2019-11-09" }
    ]; //参数列表
    const param = {
      data: timeList,
      id: "cxTime",
      width: "150px",
      index: 0,
      then: function(data) {
        console.log(data);
      }
    };
    new TimeAxis(param);
  }
};
</script>

or

const TimeAxis = require("time-axis");
new TimeAxis.default(param);

or

<script src="time-axis.js"></script>
<script type="module">
    new TimeAxis.default(param);
</script>
1.0.12

3 years ago

1.0.11

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.10

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 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