Skip to content

Commit b7602db

Browse files
author
zhanghengxin
authored
New feature to open the application. (#55)
1 parent 8ef1e56 commit b7602db

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/components/Apps/AppCard.vue

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,15 @@ export default {
308308
this.openSystemApps(item)
309309
} else if (item.app_type === 'mircoApp') {
310310
// this.showMircoApp(item);
311-
this.$messageBus('mircoapp_communicate', {
312-
action: MIRCO_APP_ACTION_ENUM.OPEN,
313-
name: item.name
314-
})
311+
if (item.open_type === "newTab") {
312+
window.open(`./modules/${item.name}`, '_blank');
313+
} else {
314+
this.$messageBus('mircoapp_communicate', {
315+
action: MIRCO_APP_ACTION_ENUM.OPEN,
316+
name: item.name
317+
})
318+
}
319+
315320
} else if (this.isLinkApp) {
316321
window.open(item.hostname, '_blank');
317322
this.removeIdFromSessionStorage(item.name);

src/components/Apps/AppSection.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,14 +233,15 @@ export default {
233233
})
234234
// mirco app list
235235
const mircoAppListRaw = await this.$api.sys.getEntry().then(res => res.data.data || []);
236-
const mircoAppList = mircoAppListRaw.map(item => {
236+
const mircoAppList = mircoAppListRaw.filter(item=> item?.show ?? true).map(item => {
237237
return {
238238
name: item.name,
239239
entry: item.entry,
240240
title: item.title,
241241
icon: item.icon,
242242
status: "running",
243243
app_type: "mircoApp",
244+
open_type: item.formality.modal,
244245
// TODO Resolve metadata structure conflicts and ensure uniformity and non-redundancy in the application's data models.
245246
// formality: item.formality,
246247
// prefetch: item.prefetch

0 commit comments

Comments
 (0)