Use
- install
npm install --save-dev verification-code-react css-loader style-loader
- webpack.config.js
Add loader
{
test: /\.css$/,
loader: 'style-loader!css-loader'//添加对样式表的处理
}
- import
import VerificationCode from "verification-code-react"
- propertys
<VerificationCode
startTime={60}
holdString="verify"
autoStart={false}
restart={this.state.restart}
callback={() => console.log("callback")} />
It is big with parent component
Propertys
Property | How |
---|---|
startTime | how long time |
holdString | waiting for show |
autoStart | render over begin or not |
restart | if u need, restart it, is optional |
callback | when countdown over do it |
warning
restart: remember set it false if u have made it be true