no message

This commit is contained in:
macbook
2024-04-27 16:48:29 +08:00
parent 3038733911
commit c81a2e4e45
2 changed files with 5 additions and 4 deletions
@@ -11,8 +11,8 @@ export default class Count extends Component{
this.props.jia(value*1)
}
decreement=()=>{
// const {value}=this.selectNumber
// const {count}=this.state
const {value}=this.selectNumber
this.props.jian(value*1)
}
increementOdd=()=>{
// const {value}=this.selectNumber
@@ -1,13 +1,14 @@
import countUI from '../../components/count'
import {connect} from 'react-redux'
import {createIncreementAction} from '../../redux/count_action'
import {createIncreementAction,createDecreementAction} from '../../redux/count_action'
function mapStateToProps(state){
return {state}
}
function mapDispatchToProps(dispatch){
return {
jia:data=>dispatch(createIncreementAction(data))
jia:data=>dispatch(createIncreementAction(data)),
jian:data=>dispatch(createDecreementAction(data))
}
}
const CountContainer=connect(mapStateToProps,mapDispatchToProps)(countUI)