TimeAxis 时间轴
小于 1 分钟
TimeAxis 时间轴
时间轴。
代码演示
基本用法
基本用法。
日志时间轴
日志时间轴。
API
TimeAxis props
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
layout | 通过设置 layout 可以改变时间轴和内容的布局方式 | horizontal | vertical | vertical |
mode | 通过设置 mode 可以改变时间轴和内容的相对位置 | left | right | bottom | top | alternate | horizontal 布局默认right , vertical 布局默认bottom |
lineOffset | 时间轴线的偏移量 | number | horizontal 布局默认left 2px, vertical 布局默认top -2px |
labelSize | label尺寸大小,设置为null时为100% | number | null | horizontal 布局默认height 18px, vertical 布局默认width 80px |
TimeAxisItem props
时间轴的每一个节点。
参数 | 说明 | 类型 | 默认值 | 版本 |
---|---|---|---|---|
color | 指定圆圈颜色 blue, red, green ,或自定义的色值 | string | #378EEF | |
dot | 自定义时间轴点 | string|slot | - | |
label | 设置标签 | slot | - |
TimeAxisLogs props
时间轴日志组件。
参数 | 说明 | 类型 | 默认值 | 版本 |
---|---|---|---|---|
timeList | 时间轴日志数据 | {createdAt: string, comment: string, children: [{ comment: string }]}[] | [] | |
defaultShow | 默认是否显示折叠内容 | boolean | true | |
labelSize | label默认长度 | number | 132 |
更多配置可参照TimeAxisItem