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') // 修改为在新窗口打开