Commit 75d723a0 authored by 邓晓峰's avatar 邓晓峰

fix: lint code style

parent 4b6631cd
Pipeline #21304 passed with stages
in 18 minutes 39 seconds
This diff is collapsed.
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
"analyze": "node ./internals/scripts/analyze.js", "analyze": "node ./internals/scripts/analyze.js",
"npmcheckversion": "node ./internals/scripts/npmcheckversion.js", "npmcheckversion": "node ./internals/scripts/npmcheckversion.js",
"preinstall": "npm run npmcheckversion", "preinstall": "npm run npmcheckversion",
"prebuild": "npm run lint",
"build": "cross-env NODE_ENV=production node internals/webpack/build.js", "build": "cross-env NODE_ENV=production node internals/webpack/build.js",
"build:clean": "rimraf ./build", "build:clean": "rimraf ./build",
"start": "cross-env NODE_ENV=development node server --port=$port", "start": "cross-env NODE_ENV=development node server --port=$port",
......
...@@ -42,6 +42,8 @@ class AvatarDropdown extends React.Component { ...@@ -42,6 +42,8 @@ class AvatarDropdown extends React.Component {
return false; return false;
} }
this.props.updateCurrentIndex && this.props.updateCurrentIndex(0);
this.props.history.push( this.props.history.push(
`/user/login/?client=${window.globalConfig.client}`, `/user/login/?client=${window.globalConfig.client}`,
); );
......
...@@ -181,7 +181,7 @@ const GlobalHeaderRight = props => { ...@@ -181,7 +181,7 @@ const GlobalHeaderRight = props => {
<OrderIcon onClick={handleOrder} title="工单" /> <OrderIcon onClick={handleOrder} title="工单" />
</div> </div>
<NoticeIconView title="消息" /> <NoticeIconView title="消息" />
<Avatar menu global={props.global} /> <Avatar menu global={props.global} updateCurrentIndex={props.updateCurrentIndex}/>
{/* <SelectLang className={styles.action} /> */} {/* <SelectLang className={styles.action} /> */}
</div> </div>
); );
...@@ -208,6 +208,10 @@ const mapDispatchToProps = dispatch => ({ ...@@ -208,6 +208,10 @@ const mapDispatchToProps = dispatch => ({
clearRecentProduct() { clearRecentProduct() {
dispatch(actionCreators.clearRecentProduct()); dispatch(actionCreators.clearRecentProduct());
}, },
updateCurrentIndex(index) {
dispatch(actionCreators.updateCurrentIndex(index))
}
}); });
export default connect( export default connect(
mapStateToProps, mapStateToProps,
......
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