vux
  • 关于Vux
  • 开始使用之前
  • 常见问题
  • 兼容
  • 组件规范
  • PR规范
  • playground
  • 版本变更
  • 谁在使用
  • 最佳实践
  • 安装
    • vue-cli项目引用.vue组件(推荐)
    • vue-cli项目引用umd组件
    • 使用script全局引入
  • 布局组件
    • Flexbox
    • Scroller
    • Tab 选项卡
    • Popup 弹出层
    • Sticky 自动固定在顶部
    • Tabbar 底部导航
    • ButtonTab
    • Timeline
    • XHeader
    • Step
  • UI组件
    • divider 横向分隔线
    • badge
    • icon
    • Search 搜索
  • 常用样式
    • 1px解决方案
    • reddot红点提示
  • 表单组件
    • Group表单分组组件
    • Cell
    • Address
    • x-button 按钮
    • x-input 单行文本输入
    • x-textarea 多行输入框
    • x-number 数字输入
    • checklist 多选
    • selector 下拉选择
    • switch 开关
    • rater 评分
    • Inline-Calendar 内联日历
    • Calendar 日历
    • Radio 单选
    • Checker 灵活的选择组件
    • Datetime 时间
    • Range
    • picker
    • popup-picker
    • 表单验证(v0.1.1)
  • 时间组件
    • 日期倒计时
    • 秒数倒计时
    • 轻量时间格式化
    • 相对时间
  • 数字组件
    • number-roller 数字滚动
  • 提示组件
    • Loading
    • Alert
    • Confirm
    • Toast
    • Actionsheet
    • Dialog
    • Spinner
  • 图片
    • 背景模糊
    • 半透明遮罩
    • 轮播
    • 表情图片
    • 上传(未支持)
    • 点击全屏预览图片(未支持)
  • 动态检测
    • 屏幕翻转
    • 手机摇一摇
  • 图表组件
    • Circle 圆圈
  • http请求
  • router 路由
  • 手势操作
Powered by GitBook
On this page
  • Props
  • timeline
  • Demo
  1. 布局组件

Timeline

Props

timeline

参数

说明

类型

默认值

color

可选,线条颜色

String

#04BE02

Demo

``` vux height=250 components=Timeline,TimelineItem

【广东】 广州市 已发出 </template>

### 动态改变条目数量

``` vux height=600 components=Timeline,TimelineItem,XButton

<template>
<div class="timeline-demo">
  <timeline>
    <timeline-item v-for="i in count">
      <h4 :class="[i === 0 ? 'recent' : '']">Timeline Node {{i + 1}}</h4>
      <p :class="[i === 0 ? 'recent' : '']">index {{i + 1}}</p>
    </timeline-item>
  </timeline>
  <x-button type="primary" @click="count = 6"> Set to 6 nodes</x-button>
  <x-button type="primary" @click="count = 3"> Set to 3 nodes</x-button>
</div>
</template>
<script>
export default {
  data () {
    return {
      count: 3
    }
  }
}
</script>
<style>
  .timeline-demo p {
    color: #888;
    font-size: 0.8rem;
  }

  .timeline-demo h4 {
    color: #666;
    font-weight: normal;
  }

  .timeline-demo .recent {
    color: rgb(4, 190, 2);
  }
</style>
PreviousButtonTabNextXHeader

Last updated 7 years ago