From 96546362a2d6b3b8855d6eda9fe0e9372e157c11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BB=96=E5=A4=A7=E9=9B=AA?= <2291335922@qq.com> Date: Tue, 7 Dec 2021 14:59:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=AA=E8=A1=A8=E7=9B=98=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E9=80=89=E9=A1=B9=E5=8D=A1=E6=9F=A5=E7=9C=8B=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=EF=BC=8C=E9=A1=B5=E9=9D=A2=E6=97=A0=E6=95=B0=E6=8D=AE=20#2539?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/views/tab_iframe.coffee | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/creator/packages/steedos-creator/client/views/tab_iframe.coffee b/creator/packages/steedos-creator/client/views/tab_iframe.coffee index a42cbdc57a..c75785011d 100644 --- a/creator/packages/steedos-creator/client/views/tab_iframe.coffee +++ b/creator/packages/steedos-creator/client/views/tab_iframe.coffee @@ -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 ->