仪表盘通过选项卡查看页面,页面无数据 #2539

This commit is contained in:
廖大雪 2021-12-07 14:59:20 +08:00
parent 0f117e8055
commit 96546362a2

View File

@ -2,21 +2,29 @@ Template.creator_tab_iframe.helpers
subsReady: ->
return Steedos.subsBootstrap.ready()
url: ->
currentTabId = Session.get("tab_name")
currentAppMenus = Creator.getAppMenus()
if currentAppMenus && currentAppMenus.length
currentMenu = currentAppMenus.find (menu)->
return menu.id == currentTabId
if currentMenu
return Creator.getAppMenuUrlForInternet currentMenu
return Template.instance().iframeUrl.get()
Template.creator_tab_iframe.events
Template.creator_tab_iframe.onCreated ->
this.iframeUrl = new ReactiveVar("")
Template.creator_tab_iframe.onRendered ->
#
Steedos.forbidNodeContextmenu window, "#app_iframe"
self = this
this.autorun ->
self.iframeUrl.set("")
currentTabId = Session.get("tab_name")
currentAppMenus = Creator.getAppMenus()
url = ""
if currentAppMenus && currentAppMenus.length
currentMenu = currentAppMenus.find (menu)->
url = menu.id == currentTabId
if currentMenu
url = Creator.getAppMenuUrlForInternet currentMenu
Meteor.defer ()->
self.iframeUrl.set(url)
Template.creator_tab_iframe.onDestroyed ->