From d82a07755048d4715f0b27f01e05c7ee1f4766b9 Mon Sep 17 00:00:00 2001 From: ronger Date: Sun, 30 May 2021 12:08:20 +0800 Subject: [PATCH] =?UTF-8?q?:poop:=20=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/layouts/pc/header.vue | 41 +++++++++++++++++++++++++++----- pages/search.vue | 14 +++++++---- 2 files changed, 45 insertions(+), 10 deletions(-) diff --git a/components/layouts/pc/header.vue b/components/layouts/pc/header.vue index 68985c5..a9d81d2 100644 --- a/components/layouts/pc/header.vue +++ b/components/layouts/pc/header.vue @@ -18,12 +18,21 @@ - - - - + + + + + + + 创建作品集 @@ -69,6 +78,17 @@ + + + + + + 登录 @@ -141,7 +161,9 @@ export default { timeout: null, show: false, notifications: [], - notificationNumbers: "" + notificationNumbers: "", + showPopover: false, + autofocus: false }; }, watch: { @@ -154,6 +176,13 @@ export default { this.$router.push({ path: `/search?q=${this.queryString}` }) + this.$set(this, 'showPopover', false); + this.$set(this, 'queryString', ''); + }, + handleShowPopover() { + setTimeout(function () { + document.getElementById("searchInput").focus() + }, 500); }, handleSelectMenu(item) { let _ts = this; @@ -223,7 +252,7 @@ export default { let user = this.user; if (user) { this.getUnreadNotifications(); - sockClient.initSocket(this.$store.state.userInfo); + // sockClient.initSocket(this.$store.state.userInfo); } } diff --git a/pages/search.vue b/pages/search.vue index 03389ed..9ec0214 100644 --- a/pages/search.vue +++ b/pages/search.vue @@ -1,7 +1,9 @@