timeline-slider-vue
Demo
Github
npm install --save timeline-slider-vue
main.js
import TimelineSliderVue from 'timeline-slider-vue'
import 'timeline-slider-vue/lib/timeline-slider-vue.css'
Vue.use(TimelineSliderVue)
{{ scope.data }}
使用示例
{{ scope.data }}
参数 | 类型 | 默认值 | 说明 |
---|---|---|---|
date | String | ‘’ | yyyy-MM-dd 格式的日期,根据传入的日期,设置滑块的位置 |
mask | Boolean | true | 拖动过程中是否显示遮罩层 |
mark-date | Array | [] | 一些特殊日期标注,例如 [‘2022-03-08’, ‘2022-06-18’, ‘2022-11-11’] |
lock-date | Array | [] | 锁定的日期,只能在指定日期下切换,当滑块拖动到其他位置,自动跳到离指定日期最近的日期处例如 [‘2022-03-08’, ‘2022-06-18’, ‘2022-11-11’] |
参数 | 说明 |
---|---|
sliderContent | 滑块内容 |
事件名称 | 说明 | 回调参数 |
---|---|---|
change | 值改变时触发(使用鼠标拖拽时,只在松开鼠标后触发) | 改变后的值 |
input | 数据改变时触发(使用鼠标拖拽时,活动过程实时触发) | 改变后的值 |
yarn install
yarn serve
yarn build
yarn lint