Commit 3af50164 authored by Alan 张加强's avatar Alan 张加强

update

parent d3ed529c
/*
* @Author: your name
* @Date: 2020-06-19 16:41:51
* @LastEditTime: 2020-06-19 16:42:20
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \dva-jingzi-game\src\component\box.js
*/
import styled from 'styled-components';
import WinImg from './winImg';
const Box = styled.div `
......@@ -26,6 +34,8 @@ function BoxMaster(props) {
flag: value.nowFliage,
})
// 保存每一步操作
console.log("11");
props.dispatch({
type: 'main/saveActionFn',
id: value.value,
......@@ -47,16 +57,21 @@ function BoxMaster(props) {
}
return (
<Box onClick={ () => handelClick(props)} style={{background:props.winner && props.value === props.winner.value ?"":props.color}}>
{
props.winner && props.value === props.winner.value ? (
<WinImg flag={props.flag} />
) : (<span>{props.flag}</span>)
return ( <
Box onClick = {
() => handelClick(props)
}
</Box>
style = {
{ background: props.winner && props.value === props.winner.value ? "" : props.color }
} > {
props.winner && props.value === props.winner.value ? ( <
WinImg flag = { props.flag }
/>
) : ( < span > { props.flag } < /span>)
} <
/Box>
)
}
}
export default BoxMaster
export default BoxMaster
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment