1.0.1 • Published 3 years ago

vue-datapick-syx v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Vue-tlpick

更新最新vue-clivue 最新版

基于creatjs开发的 时间范围内的选择时间轴, 取当前时间之前一段时间范围 按刻,小时,天分类。

依赖d3 ,TweenMax

https://yelingfeng.github.io/vue-tlpick/

下载安装

  npm install vue-tlpick  

插件使用

引入依赖文件

import "vue-tlpick/src/createjs"
import "vue-tlpick/src/TweenMax"
import "vue-tlpick/lib/vue-tlpick.css"
import tlpick from "vue-tlpick"
Vue.use(tlpick)

vue组件中直接使用

<tlpick :option="op" :width="width" :height="height" :change="changeAction"></tlpick>

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;
    }
}

props

属性说明
width
height
option配置项
change事件

options

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

二次开发

yarn install

Compiles and hot-reloads for development

yarn run serve

Compiles and minifies for production

yarn run build

Lints and fixes files

yarn run lint