@fesjs/fes-design
Version:
fes-design for PC
76 lines (65 loc) • 1.35 kB
JavaScript
/** 严格版本的 Extract */
/** 时间轴的正方向,值同 flex 布局的 direction */
/**
* 时间轴结点中,「标题」相对「轴」的位置
*
* 视时间轴为 flex 布局中的主轴
* - start:表示交叉轴方向的 start 一侧
* - end:表示交叉轴方向的 end 一侧
* - alternate: 表示交替排列
*/
/**
* 时间轴结点中,「辅助描述」相对「标题」的位置
*
* - under:在标题下方
* - inline:与标题同行
* - opposite:在标题对面(跨过时间轴)
*/
/**
* 时间轴结点颜色
*
* - info: primary-color
* - success: success-color
* - warning: warning-color
* - error: danger-color
*
* ref: _theme/base.ts
*/
/**
* 时间轴结点插槽或渲染函数的共同参数
*
* - #desc
* - #icon
*/
/** 时间轴结点的参数 */
const timelineProps = {
direction: {
type: String,
default: 'column'
},
titlePosition: {
type: String,
default: 'end'
},
descPosition: {
type: String,
default: 'under'
},
data: {
type: Array,
required: true
},
titleClass: {
type: String
},
descClass: {
type: String
},
titleWidth: {
type: String,
default: '50%'
}
};
// 组件暴露给外部的 props 类型
// 组件内部使用的 props 类型(包含了 default)
export { timelineProps };