# time-axis-auto

> It is a automtic timeline component.

Latest version **0.1.4** (published 2020-07-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install time-axis-auto
pnpm add time-axis-auto
yarn add time-axis-auto
bun add time-axis-auto
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2020-07-27 |
| First published | 2020-07-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 62.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | dex |
| Maintainers | dengxiaoning |
| Keywords | timeLine, time-axis-auto, timeAxisAuto |

## Links

- npm: https://www.npmjs.com/package/time-axis-auto
- Repository: https://github.com/dengxiaoning/time-axis-auto
- Homepage: https://github.com/dengxiaoning/time-axis-auto.git
- Issues: https://github.com/dengxiaoning/time-axis-auto.git
- npm.io page: https://npm.io/package/time-axis-auto

## Recent versions

- 0.1.4 (latest) — 2020-07-27
- 0.1.3 — 2020-07-26

## README

# time-axis-auto


## Project setup
```
npm install time-axis-auto --save
```
### 运行效果
<table>
    <tr>
        <td ><center><img src="./public/test.gif" ></center></td>
    </tr>
</table>

####  [在线demo https://www.benpaodehenji.com/timeline](https://www.benpaodehenji.com/timeline)

## Use 
### main.js 
```
import 'time-axis-auto'
```

### test.vue

```
<template>
      <time-axis-auto
      :options="options"
      :dateTimes="dateTimeList"
      @getDateFun="getDateFun"
      :interval="interval"
    ></time-axis-auto>
</template>
<script>
export default {
  data() {
    return {
      date: '',
      options: {
        speed: 1, // 速度
        speedMax: 10 // 速度最大值
      },
      interval: 50, // 日期间的间隔
     dateTimeList:[]
    }
  },
  created(){
    this.initTimeLine()
  },
  methods: {
        // 时间轴数据初始化
    initTimeLine() {
      let count = 0
      while (count < 24) {
        const timeRes = count < 10 ? `0${count}:00` : `${count}:00`
        this.dateTimeList.push(timeRes)
        count++
      }
    },
    getDateFun(time) {
      console.log(time)
    }
  }
}
</script>
```



#### The case reference https://www.jianshu.com/p/fb51fe44ff47

---
_Source: https://npm.io/package/time-axis-auto · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
