trunk/pc4mobx/organization/components/resource/AnchorDetect.js

62 lines
1.3 KiB
JavaScript
Raw Normal View History

2022-09-23 16:53:25 +08:00
import {
WeaFormItem,
} from 'ecCom'
import {
Spin,
Button,
2022-09-27 17:50:56 +08:00
Timeline
2022-09-23 16:53:25 +08:00
} from 'antd'
import {
i18n
} from '../../public/i18n';
import '../../style/common.less';
export default class AnchorDetect extends React.Component {
constructor(props) {
super(props);
this.state = {
}
}
2022-09-27 17:50:56 +08:00
componentDidMount() {
}
componentWillUnmount() {
2022-09-23 16:53:25 +08:00
2022-09-27 17:50:56 +08:00
}
render() {
const {
anchorList,
activity,
onChange
} = this.props;
const activityStyle = {
color:"#4aacf4"
}
2022-09-23 16:53:25 +08:00
return (
2022-09-27 17:50:56 +08:00
<div className='right'>
<Timeline>
{
anchorList.map((item,index) => {
return(
<Timeline.Item color={activity == index ? 'blue' : 'gray'} dot={activity == index ? <i className="icon-coms-position" color='#4aacf4'/> : ''}>
<span style={activity == index ? activityStyle : {}} className='title' onClick={() => onChange(item.id,index)}>{item.title}</span>
</Timeline.Item>
)
})
}
</Timeline>
</div>
2022-09-23 16:53:25 +08:00
)
}
}