Skip to content

Commit

Permalink
fix: 任务执行页被嵌入后,点击返回抛出事件逻辑提前 --story=121000017
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 27337
  • Loading branch information
ywywZhou authored and luofann committed Dec 20, 2024
1 parent 4f3737a commit 7fd4121
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@
this.$emit('onTaskParamsClick', type, name)
},
onBack () {
// 如果被嵌入了,则像父页面发送事件
if (this.hideHeader) {
window.parent.postMessage({ eventName: 'goBackEvent' }, '*')
return
}
if (this.view_mode === 'appmaker') {
return this.$router.push({
name: 'appmakerTaskHome',
Expand All @@ -221,11 +226,6 @@
if (!isFromCreate && this.$route.name === 'taskExecute' && window.history.length > 2) {
return this.$router.back()
}
// 如果被嵌入了,则像父页面发送事件
if (this.hideHeader) {
window.parent.postMessage({ eventName: 'goBackEvent' }, '*')
return
}
this.$router.push({
name: 'taskList',
params: { project_id: this.project_id }
Expand Down

0 comments on commit 7fd4121

Please sign in to comment.