# Timeline 时间轴 UPDATE

按照时间顺序或倒序的规则展示信息内容。

# 属性对比(只显示有差异的)

Timeline 参数 WinDesign Element-ui
position
current-node
mode
Timeline-item 参数 WinDesign Element-ui
type
可选值: primary / success / warning / error / info
可选值: primary / success / warning / danger / info
color
size
可选值: 支持自定义具体值,如 18px
可选值: normal / large
icon
index
Timeline-item Slot WinDesign Element-ui
content
Events WinDesign Element-ui
node-actived

# 代码演示

# API

# Timeline Attributes

参数 说明 类型 可选值 默认值 Version
reverse 指定节点排序方向,默认为正序 boolean false V2.2.5
current-node 当前被激活的节点 v2.0.0
position 时间线的位置 String 'left' | 'right' 'left'
placement * 同 position String 'left' | 'right' v2.0.0
mode 模式 String 'horizontal' | 'vertical' 'vertical' V2.2.14
border 内容是否带边框线 Boolean true V2.4.15

# Timeline-Item Attributes

参数 说明 类型 可选值 默认值 Version
hide-timestamp 是否隐藏时间戳 Boolean false v2.0.0
index 时间节点 index(设置 current-node 时必填项) v2.0.0
time 时间戳文本 String
timestamp * 同 time String v2.0.0
title 标题内容 String
type 节点类型 String 'default' | 'primary' | 'success' | 'warning' | 'info' | 'error' 'default' v2.0.0
node-size 节点大小(默认为 10px, 用于自定义节点时绝对居中) String
size * 同 node-size String v2.0.0
placement 时间戳位置 string top / bottom / left bottom V2.2.5
vertical-center 内容是否垂直居中 Boolean - false V2.4.17

# Timeline Slot

name 说明 Version
时间节点内容

# Timeline-Item Slot

name 说明 Version
node 自定义节点 (默认为圆圈)
dot * 同 node v2.0.0
content 描述内容 v2.0.0
节点信息 v2.0.0

# Events

参数 说明 回调参数 Version
node-click 点击时间节点时的回调函数(节点必须设置唯一的 index 值否则无效) (在 v2.0.0 版本被废弃) 当前被激活节点的 index 值
node-actived 激活时间节点时的回调函数(节点必须设置唯一的 index 值否则无效) 当前被激活节点的 index 值
上次更新: 7/19/2024, 10:38:01 AM