Skip to content

Commit 597c49d

Browse files
authored
fix: The method of opening the development application window is modified (#1753)
1 parent fa2623a commit 597c49d

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

  • packages/workspace/application-center/src

packages/workspace/application-center/src/Main.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,18 @@ export default {
208208
209209
const openApplication = (template) => {
210210
const href = window.location.href.split('?')[0] || './'
211-
window.open(`${href}?type=app&id=${template.id}&tenant=${template.tenantId || queryParams.get('tenant')}`)
211+
const newUrl = `${href}?type=app&id=${template.id}&tenant=${template.tenantId || queryParams.get('tenant')}`
212+
if (window.self !== window.top) {
213+
window.parent.postMessage(
214+
{
215+
type: 'openNewTab',
216+
url: newUrl
217+
},
218+
'*'
219+
)
220+
} else {
221+
window.open(newUrl)
222+
}
212223
}
213224
214225
const typeClick = (type) => {

0 commit comments

Comments
 (0)