From 8f1a9b0fdaf25275835557e4370ce770738c7187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=99=E7=A0=81=E7=94=9F=E8=8A=B1?= <18523774412@qq.com> Date: Wed, 9 Oct 2024 00:38:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E5=90=8E=E6=89=93=E5=BC=80=E8=8F=9C=E5=8D=95=E5=8D=A1=E9=A1=BF?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/stores/navTabs.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/stores/navTabs.ts b/web/src/stores/navTabs.ts index d25a72b1..fbcb483f 100644 --- a/web/src/stores/navTabs.ts +++ b/web/src/stores/navTabs.ts @@ -1,4 +1,4 @@ -import { cloneDeep, isEmpty } from 'lodash-es' +import { isEmpty } from 'lodash-es' import { defineStore } from 'pinia' import { reactive } from 'vue' import type { RouteLocationNormalized, RouteRecordRaw } from 'vue-router' @@ -50,7 +50,7 @@ export const useNavTabs = defineStore( * ps: router.push 时可自动完成 tab 添加,无需调用此方法 */ function _addTab(route: RouteLocationNormalized) { - const tabView = cloneDeep(route) + const tabView = { ...route, matched: [], meta: { ...route.meta } } if (!tabView.meta.addtab) return // 通过路由寻找菜单的原始数据