fix timeline

pull/165/head
tjz 2018-04-03 21:01:05 +08:00
parent 147a980e43
commit c4a67a4a61
1 changed files with 6 additions and 4 deletions

View File

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