mirror of
https://gitee.com/log4j/pig-ui.git
synced 2024-12-22 21:22:33 +08:00
'admin-21.07.15:优化tagsView动态路由时的右键菜单'
This commit is contained in:
parent
d9e9779581
commit
804213a646
@ -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);
|
||||
|
@ -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: [
|
||||
|
Loading…
Reference in New Issue
Block a user