Merge branch '2.0-bugfix' into dev

This commit is contained in:
xieyonghong 2023-04-27 11:43:54 +08:00
commit 84e4b790d1
3 changed files with 13 additions and 10 deletions

View File

@ -280,7 +280,8 @@ export function filterAsyncRouter(asyncRouterMap: any, parentCode = '', level =
icon: route.icon,
title: route.name,
hideInMenu: route.isShow === false,
buttons: route.buttons?.map((b: any) => b.id) || []
buttons: route.buttons?.map((b: any) => b.id) || [],
isApp: hasAppId,
},
}

View File

@ -157,19 +157,17 @@ const defualtDataSource: any = ref(_.cloneDeep(root));
const defualtParams = {
paging: false,
sorts: [{ name: 'createTime', order: 'desc' }],
terms: [
terms: !!channelId ? [
{
terms: !!channelId
? [
terms: [
{
column: 'channelId',
value: channelId,
},
]
: [],
],
type: 'and',
},
],
] : [],
};
const params = ref();

View File

@ -38,10 +38,14 @@ const handle = async (appId: string, url: string) => {
}
};
watchEffect(() => {
const params = route.path.split('/')?.[1];
const url = route.path.split('/').slice(2).join('/');
handle(params, url);
const matchedItem: any = route.matched?.[0]
if (matchedItem?.meta?.isApp) {
const params = route.path.split('/')?.[1];
const url = route.path.split('/').slice(2).join('/');
handle(params, url);
}
});
</script>