开源vue的time line 插件

vue-timeline

由于在vue没找到适合的插件,就自己封装了一个基于css3的
插件地址:click me!

logo.png

预览

![small.png](http://upload-images.jianshu.io/upload_images/3178153-9b89ffa883b01834.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

特性

  1. 响应式
  2. 鼠标移入时间点有回调事件

使用方法

  1. 引入components底下的timeLine 并绑定points属性
<timeLine :points="points"></timeLine>
  1. 配置每个时间点(可以缺少或不配置大部分选项)
points: [
          {
            pointColor: 'red', // important! the color of every time point and you can use red yellow or green *关键点颜色 可选red yellow green
            img: 'http://www.jikexueyuan.com/event/static/images/bootstrap/bootstrap-logo.png', // img url for every time point 图片地址 可留空
            title: 'hello world', // important! title *时间点标题
            text: 'first post', // important! the content you want show *时间点内容
            linkUrl: 'https://www.google.com', // url for read more 链接url 留空则不显示按钮
            linkText: 'Read detail', // show what in read for more button 按钮显示内容 默认为Read more
            date: '2017-1-1' // time of the point 时间点
          }
        ]
  1. currentPoint为绑定回调函数
<timeLine @currentPoint="your function"></timeLine>
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 9,939评论 0 23
  • 25年前的今日,母亲生下了我,才有了我的故事。 刚才给母亲打电话后,兔子说了句稍显深沉的话,“我只是觉得生日为什么...
    写作者陈菁阅读 468评论 0 0
  • 学校又来了几只新猫 住所又不够了 荒儿把自己的一间房给了新猫 新猫清闲的生了几只小猫 新猫说荒儿是好猫 小猫在荒儿...
    别碰我的后槽牙阅读 125评论 0 0
  • 夜晚,月亮是草字头的那种白 天穹像蓝墨水一样蓝 万物仿佛恢复了童年 树影摇晃,风在收割 它收走了一地的空酒瓶,昏沉...
    舒严阅读 313评论 0 0
  • 产品是什么: <1 产品是一组将输入转化为输出的相互关联或相互作用的活动”的结果,即“过程” 的结果。 <2 在经...
    产品经理从入门到放弃阅读 657评论 0 50