We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我想把pointer的change事件去掉,传的是一个component,但是传了之后没有效果怎么回事?
getPointer = () => { console.log(11111); this.setState({ isOpen: false }); return ( <Pointer length={this.props.listImages.length} index={this.state.currIndex} changeIndex={() => {}}></Pointer> ); }
pointer组件内容:
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; class Pointer extends PureComponent { static propTypes = { length: PropTypes.number.isRequired, index: PropTypes.number.isRequired, changeIndex: PropTypes.func } render() { const { length, index } = this.props; let i = 0, items = []; for (i; i < length; i++) { if (i === index) { items.push(<span className='pointer on'></span>); } else { items.push(<span className='pointer'></span>); } } return ( <div className='viewer-image-pointer'> {items} </div> ); } } export default Pointer;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
我想把pointer的change事件去掉,传的是一个component,但是传了之后没有效果怎么回事?
pointer组件内容:
The text was updated successfully, but these errors were encountered: