mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 14:41:29 +00:00
fix:修复编译后打开菜单卡顿的问题
This commit is contained in:
parent
08445fba0a
commit
8f1a9b0fda
@ -1,4 +1,4 @@
|
|||||||
import { cloneDeep, isEmpty } from 'lodash-es'
|
import { isEmpty } from 'lodash-es'
|
||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { reactive } from 'vue'
|
import { reactive } from 'vue'
|
||||||
import type { RouteLocationNormalized, RouteRecordRaw } from 'vue-router'
|
import type { RouteLocationNormalized, RouteRecordRaw } from 'vue-router'
|
||||||
@ -50,7 +50,7 @@ export const useNavTabs = defineStore(
|
|||||||
* ps: router.push 时可自动完成 tab 添加,无需调用此方法
|
* ps: router.push 时可自动完成 tab 添加,无需调用此方法
|
||||||
*/
|
*/
|
||||||
function _addTab(route: RouteLocationNormalized) {
|
function _addTab(route: RouteLocationNormalized) {
|
||||||
const tabView = cloneDeep(route)
|
const tabView = { ...route, matched: [], meta: { ...route.meta } }
|
||||||
if (!tabView.meta.addtab) return
|
if (!tabView.meta.addtab) return
|
||||||
|
|
||||||
// 通过路由寻找菜单的原始数据
|
// 通过路由寻找菜单的原始数据
|
||||||
|
Loading…
Reference in New Issue
Block a user