Skip to content

callmejm/react-lucky-wheel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

lucky-wheel使用说明

  1. 安装lucky-wheel包 npm install -S lucky-wheel
  2. render组件
import LuckyWheel from 'lucky-wheel';

constructor(props) {
  super(props);
  this.state = {
    position: 0,
    isComplete: false
  }
}
handleLoadData = () => {
  setTimeout(() => {
    this.setState({
      position: 2,
      isComplete: true
    })
  }, 1000);
}
handleComplete = () => {
  this.setState({isComplete: false})
}

render() {
  return (
    <LuckyWheel
       onLoadData={this.handleLoadData}
       position={this.state.position}
       areaNum={7}
       cycle={10}
       isComplete={this.state.isComplete}
       onComplete={this.handleComplete}
	     TURNTABLE_BG={TURNTABLE_BG} // new added
	     TURNTABLE={TURNTABLE}// new added
	     POINTER={POINTER}// new added
    />
  )
}

💖 Support my projects

If you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:

Buy Me A Coffee

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published