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 @@