From cfd0b38a5344833cbb4e16baf9887832e3161a3b Mon Sep 17 00:00:00 2001 From: chenghx Date: Thu, 6 Sep 2018 14:23:40 +0800 Subject: [PATCH] refactor: refactor style and children components --- src/components/layout/HeaderSearch.vue | 66 ++++++++++++-------------- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/src/components/layout/HeaderSearch.vue b/src/components/layout/HeaderSearch.vue index ec7b601..ac735eb 100644 --- a/src/components/layout/HeaderSearch.vue +++ b/src/components/layout/HeaderSearch.vue @@ -1,14 +1,13 @@ @@ -29,7 +28,7 @@ export default { methods: { enterSearchMode () { this.searchMode = true - this.$refs.input.focus() + setTimeout(() => this.$refs.input.focus(), 300) }, leaveSearchMode () { this.searchMode = false @@ -38,35 +37,32 @@ export default { } -