企业级时间轴插件Vue-timelinepick

简介

时间范围选择插件 取当前时间之前一段时间范围 按刻,小时,天分类

在线演示及下载

在线演示:https://yelingfeng.github.io/vue-timelinepick/
本地下载

依赖

  • jquery <=2.x
  • d3 < 4.x
  • createjs
  • tweenMax

使用方法

引入依赖文件

import timelinepick from "vue-timelinepick"
import "vue-timelinepick/dist/vue-timelinepick.css"

Vue.use(timelinpick)

vue组件中直接使用

<timelinepick :option="op" :width="width" :height="height" :handler="changeAction"></timelinepick>

data() {
      return {
          "width": 1200,
          "height":110,
          "op" : {
              "threshold": new Date(),
              "number": 97,
              "spanMinNumber": 10,
              "isFixedDrag" : true,
              "spanIndex": {start: 70, end: 97},
              "type": "quarter",
              "dateFormat" : 'yyyy-MM-dd mm:hh:ss'
          }
      }
  },
methods:{
    changeAction(e){
        this.startTime = e.startTime;
        this.endTime = e.endTime;
    }
}

属性

属性说明
width
height
option配置项

方法

属性说明
threshold起点时间(默认当前) new Date()
number总刻度 97
isFixedDrag是否禁止拖拽 false
spanIndex起始滑块范围 {start: 70, end: 97}
type刻度类型 "quarter"
dateFormat格式 'yyyy-MM-dd mm:hh:ss'

更多插件

转载于:https://www.cnblogs.com/wwhhq/p/8149947.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值