From cb89a861c1002d5639e0fddd4f2b7e0e433b20a6 Mon Sep 17 00:00:00 2001 From: wangqiao Date: Sat, 30 Aug 2025 17:04:22 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E6=90=9C=E7=B4=A2=E8=B7=B3=E8=BD=AC=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E5=92=8C=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/kl-nav-tab/index.vue | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/components/kl-nav-tab/index.vue b/components/kl-nav-tab/index.vue index e23c2ab..a16ff2d 100644 --- a/components/kl-nav-tab/index.vue +++ b/components/kl-nav-tab/index.vue @@ -11,7 +11,7 @@ placeholder="电子产品" :prefix-icon="Search" class="search-input h-[40px] w-[328px]" - @focus="handleHot(), (showHotList = true)" + @focus="(handleHot(), (showHotList = true))" @input="handleInput" > @@ -67,11 +67,11 @@ import { top } from '~/api/home/index' import type { ProjectDrawStatisticAppRespVO } from '~/api/home/type' import { Search } from '@element-plus/icons-vue' - import refreshToken from "~/utils/RefreshToken"; + import refreshToken from '~/utils/RefreshToken' import useUserStore from '~/stores/user' const userStore = useUserStore() const app = useNuxtApp() - + const props = defineProps({ active: { type: String, @@ -131,22 +131,25 @@ } const handleHotItem = (item: ProjectDrawStatisticAppRespVO) => { - const normal = { id: '0', name: '图纸库', isChildren: false } - const level = item.pairs?.filter(Boolean).map((item) => ({ id: item?.id, name: item?.name, isChildren: false })) || [] - level.unshift(normal) + // const normal = { id: '0', name: '图纸库', isChildren: false } + // const level = item.pairs?.filter(Boolean).map((item) => ({ id: item?.id, name: item?.name, isChildren: false })) || [] + // level.unshift(normal) if (item.type === 1) { - navigateTo(`/drawe?level=${JSON.stringify(level)}&keywords=${item.title || ''}`) + navigateTo(`/drawe/${item.projectType}/1/12/-1`) + // navigateTo(`/drawe?level=${JSON.stringify(level)}&keywords=${item.title || ''}`) } else if (item.type === 2) { - navigateTo(`/text?level=${JSON.stringify(level)}&keywords=${item.title || ''}`) + navigateTo(`/text/${item.projectType}/1/12/-1`) + // navigateTo(`/text?level=${JSON.stringify(level)}&keywords=${item.title || ''}`) } else if (item.type === 3) { - navigateTo(`/model?level=${JSON.stringify(level)}&keywords=${item.title || ''}`) + navigateTo(`/model/${item.projectType}/1/12/-1`) + // navigateTo(`/model?level=${JSON.stringify(level)}&keywords=${item.title || ''}`) } } const handleClick = (item: string) => { switch (item) { case '首页': - navigateTo({ path: '/'}) // 修改为在新窗口打开 + navigateTo({ path: '/' }) // 修改为在新窗口打开 break case '图纸': navigateTo('/drawe') // 修改为在新窗口打开