'admin-21.07.15:优化tagsView动态路由时的右键菜单'

This commit is contained in:
lyt 2021-07-15 10:53:16 +08:00
parent d9e9779581
commit 804213a646
2 changed files with 6 additions and 2 deletions

View File

@ -187,10 +187,14 @@ export default {
screenfulls.request(element);
});
};
// tagsView
const getCurrentRouteItem = (path: string) => {
return Session.get('tagsViewList').find((v: any) => v.path === path);
};
//
const onCurrentContextmenuClick = (item) => {
const { id, path } = item;
const { meta, name, params, query } = route;
const { meta, name, params, query } = getCurrentRouteItem(path);
switch (id) {
case 0:
refreshCurrentTagsView(path);

View File

@ -829,7 +829,7 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
isKeepAlive: true,
isAffix: false,
isIframe: false,
auth: ['admin', 'test'],
auth: ['admin'],
icon: 'iconfont icon-zhongduancanshu',
},
children: [