fix timeline
parent
147a980e43
commit
c4a67a4a61
|
@ -4,7 +4,6 @@ import { getOptionProps, initDefaultProps, getComponentFromProp } from '../_util
|
||||||
|
|
||||||
export const TimeLineItemProps = {
|
export const TimeLineItemProps = {
|
||||||
prefixCls: PropTypes.string,
|
prefixCls: PropTypes.string,
|
||||||
className: PropTypes.string,
|
|
||||||
color: PropTypes.string,
|
color: PropTypes.string,
|
||||||
dot: PropTypes.any,
|
dot: PropTypes.any,
|
||||||
pending: PropTypes.bool,
|
pending: PropTypes.bool,
|
||||||
|
@ -20,7 +19,7 @@ export default {
|
||||||
pending: false,
|
pending: false,
|
||||||
}),
|
}),
|
||||||
render () {
|
render () {
|
||||||
const { prefixCls, color = '', last, pending, ...restProps } = getOptionProps(this)
|
const { prefixCls, color = '', last, pending } = getOptionProps(this)
|
||||||
const dot = getComponentFromProp(this, 'dot')
|
const dot = getComponentFromProp(this, 'dot')
|
||||||
const itemClassName = classNames({
|
const itemClassName = classNames({
|
||||||
[`${prefixCls}-item`]: true,
|
[`${prefixCls}-item`]: true,
|
||||||
|
@ -33,9 +32,12 @@ export default {
|
||||||
[`${prefixCls}-item-head-custom`]: dot,
|
[`${prefixCls}-item-head-custom`]: dot,
|
||||||
[`${prefixCls}-item-head-${color}`]: true,
|
[`${prefixCls}-item-head-${color}`]: true,
|
||||||
})
|
})
|
||||||
|
const liProps = {
|
||||||
|
class: itemClassName,
|
||||||
|
on: this.$listeners,
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<li {...restProps} class={itemClassName}>
|
<li {...liProps}>
|
||||||
<div class={`${prefixCls}-item-tail`} />
|
<div class={`${prefixCls}-item-tail`} />
|
||||||
<div
|
<div
|
||||||
class={dotClassName}
|
class={dotClassName}
|
||||||
|
|
Loading…
Reference in New Issue