From b13c22021fca126ecf0a4fc1ac315cfecd668ed8 Mon Sep 17 00:00:00 2001 From: QYF-GitLab1 <1940665526@qq.com> Date: 星期日, 24 八月 2025 15:57:41 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/xiehe_website --- src/layout/components/headerPage.vue | 21 ++++++++++++++++++--- 1 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/layout/components/headerPage.vue b/src/layout/components/headerPage.vue index b83decb..a03c9ab 100644 --- a/src/layout/components/headerPage.vue +++ b/src/layout/components/headerPage.vue @@ -17,9 +17,9 @@ <el-input style="width: 500px; height: 50px" placeholder="璇疯緭鍏ュ唴瀹�" - @change="gotoSearch" v-model="searchKey" :suffix-icon="Search" + @keyup.enter="gotoSearch" > </el-input> <div class="loginInfoBox"> @@ -80,6 +80,7 @@ import { Search, Avatar, SwitchButton } from '@element-plus/icons-vue' import { useUserStore } from '@/store' import { useRouter } from 'vue-router' +import { ElMessage } from 'element-plus' const userStore = useUserStore() const router = useRouter() @@ -121,7 +122,14 @@ console.log(userInfo.value, 'userInfo') }) -const gotoSearch = () => {} +const gotoSearch = () => { + router.push({ + path: '/search', + query: { + key: searchKey.value, + }, + }) +} const handleCommand = (item) => { if (item === 'gotoPersonalCenter') { router.push({ @@ -136,7 +144,14 @@ } } const gotoPage = (item) => { - router.push(item.path) + if (item.path === '/teachingServices') { + ElMessage({ + message: '寤鸿涓�...', + type: 'warning', + }) + } else { + router.push(item.path) + } } </script> -- Gitblit v1.9.1