fix:修复编译后打开菜单卡顿的问题

This commit is contained in:
妙码生花 2024-10-09 00:38:01 +08:00
parent 08445fba0a
commit 8f1a9b0fda

View File

@ -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
// 通过路由寻找菜单的原始数据