tycoding 11 mēneši atpakaļ
vecāks
revīzija
8a90893ce4

+ 2 - 2
langchat-ui-client/src/router/index.ts

@@ -16,7 +16,7 @@
 
 import type { App } from 'vue';
 import type { RouteRecordRaw } from 'vue-router';
-import { createRouter, createWebHashHistory } from 'vue-router';
+import { createRouter, createWebHistory } from 'vue-router';
 import { Layout } from '@/layout';
 import { setupPageGuard } from '@/router/permission';
 
@@ -123,7 +123,7 @@ const baseRoutes: RouteRecordRaw[] = [
 export const routesConst: RouteRecordRaw[] = routes.flatMap((route) => route.children ?? []);
 
 export const router = createRouter({
-  history: createWebHashHistory(),
+  history: createWebHistory(),
   routes: [...baseRoutes, ...routes],
   scrollBehavior: () => ({ left: 0, top: 0 }),
 });

+ 1 - 1
langchat-ui/src/store/modules/tabsView.ts

@@ -53,7 +53,7 @@ export const useTabsViewStore = defineStore({
     addTab(route: RouteItem): boolean {
       // 添加标签页
       if (whiteList.includes(route.name)) return false;
-      const isExists = this.tabsList.some((item) => item.fullPath == route.fullPath);
+      const isExists = this.tabsList.some((item) => item.name == route.name);
       if (!isExists) {
         this.tabsList.push(route);
       }