An open API service indexing awesome lists of open source software.

https://github.com/yevin-yu/vue-time-axis

时间轴组件,支持拖拽移动,删除
https://github.com/yevin-yu/vue-time-axis

Last synced: 10 months ago
JSON representation

时间轴组件,支持拖拽移动,删除

Awesome Lists containing this project

README

          

# vuetimeaxisdemo

## 下载
```shell
npm i vuetimeaxisdemo
```

## 使用

`main.js`

```js
import vueTimeAxisDemo from 'vuetimeaxisdemo'
import 'vuetimeaxisdemo/vueTimeAxisDemo.css'
Vue.use(vueTimeAxisDemo);
```

`App.vue`

```vue



export default {
name: "App",
data() {
return {
option: {
id:'0',
width: 500,
min: 0,
max: 100,
data: [
{
id: "1",
text: "时间轴",
start: 2,
end: 20,
},
{
id: "2",
text: "时间轴2",
start:30,
end: 50,
},
],
},
};
},
};

#app {
width: 600px;
height: 300px;
background-color: pink;
margin: 0 auto;
padding: 24px;
overflow: auto;
}

```
可以拖动蓝色块进行调整,并实时更新`start`和`end`属性