From dd511658a80514fef129800129ba24a5ceb9c878 Mon Sep 17 00:00:00 2001 From: 杨磊 <505174330@qq.com> Date: 星期三, 30 四月 2025 11:02:25 +0800 Subject: [PATCH] 首页搜索 --- src/views/home/index.vue | 27 ++++++++++++++++++--------- 1 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 9259896..96480e9 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -7,7 +7,7 @@ <p>瀛︽湳鎬濇兂浼犳壙澶氱淮搴︽暟鎹簱</p> </div> <div class="searchBox"> - <SearchBox @searchFun="handleSearch" /> + <SearchBox @search="handleSearch" /> </div> </div> <div class="menuBox"> @@ -23,7 +23,9 @@ </div> <div class="menuTitle">{{ item.title }}</div> <div class="menuSubTitle">{{ item.subTitle }}</div> - <div class="menuLine"><i class="el-icon-right"></i></div> + <div class="menuLine"> + <img class="autoImg" :src="arrow" alt="" /> + </div> </div> </div> </div> @@ -47,7 +49,7 @@ import rongyu from "@/assets/images/menuIcon/rongyu.png"; import xueshu from "@/assets/images/menuIcon/xueshu.png"; import homeBg from "@/assets/images/homeBg1.jpg"; - +import arrow from "@/assets/images/right_arrow.svg"; export default { components: { SearchBox, @@ -55,6 +57,7 @@ data() { return { + arrow, menuList: [ { icon: nianpu1, @@ -95,8 +98,13 @@ this.$router.push(row.path); }, - handleSearch(type, value) { - console.log(type, value); + handleSearch(type) { + if (type.text != "") { + this.$router.push({ + name: "achievements", + query: { type: type.type, value: type.text }, + }); + } }, //鑾峰彇浜虹墿浠嬬粛 getPersonInfo() { @@ -130,7 +138,6 @@ position: relative; box-sizing: border-box; font-family: siyuan; - } .bgBox { width: 100%; @@ -214,9 +221,11 @@ font-size: 28px; margin-top: 20px; font-family: siyuan; - } .menuLine { + width: 30px; + height: 30px; + position: relative; margin-top: 40px; font-size: 40px; } @@ -251,10 +260,10 @@ text-align: center; } -@media screen and (min-width: 1950px) { +/* @media screen and (min-width: 1950px) { .textInfo { font-size: 20px; line-height: 24px; } -} +} */ </style> -- Gitblit v1.9.1