diff --git a/src/components/HeaderSearch/index.js b/src/components/HeaderSearch/index.js index f1ba25fdcdc2502aab81ee734b19f41b043ba24a..06ad10b299cc38e3e115391d295ceb3add5fc948 100644 --- a/src/components/HeaderSearch/index.js +++ b/src/components/HeaderSearch/index.js @@ -27,7 +27,7 @@ export default class HeaderSearch extends PureComponent { enterSearchMode = () => { this.setState({ searchMode: true }, () => { if (this.state.searchMode) { - this.input.refs.input.focus(); + this.input.focus(); } }); } diff --git a/src/layouts/BasicLayout.less b/src/layouts/BasicLayout.less index 0e3c0dd12c64a368dda1a6856d7cb0c1f36dbb07..67daf60a903a0701fa14022854ef745cacc67b70 100644 --- a/src/layouts/BasicLayout.less +++ b/src/layouts/BasicLayout.less @@ -66,8 +66,12 @@ background: rgba(0, 0, 0, .04); } } - .search:hover { - background: transparent; + .search { + padding: 0; + margin: 0 12px; + &:hover { + background: transparent; + } } .account { .avatar {