From 6ff97cd80a424725b81e5b70c889313351d7cdb5 Mon Sep 17 00:00:00 2001 From: zsmj1994 Date: Wed, 19 Aug 2020 18:28:03 +0800 Subject: [PATCH] =?UTF-8?q?DEC-14674=20feat:=20iframe=E6=96=B0=E5=A2=9EEVE?= =?UTF-8?q?NT=5FLOADED=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.md | 1 + src/base/single/iframe/iframe.js | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 6bbed05652..e81bc43594 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,6 @@ # 更新日志 2.0(2020-08) +- bi.iframe新增EVENT_LOADED事件 - 修复了searcher在允许搜索的情况下输入空格直接退出搜索的问题 - 修复了复选下拉系列'点按空格添加完全匹配项'添加的是显示值而非实际值的问题 - search_text_value_combo支持水印 diff --git a/src/base/single/iframe/iframe.js b/src/base/single/iframe/iframe.js index 5641fbddca..81269bdad9 100644 --- a/src/base/single/iframe/iframe.js +++ b/src/base/single/iframe/iframe.js @@ -19,11 +19,14 @@ BI.Iframe = BI.inherit(BI.Single, { }, _init: function () { - var o = this.options; + var self = this, o = this.options; o.attributes.frameborder = "0"; o.attributes.src = o.src; o.attributes.name = o.name; BI.Iframe.superclass._init.apply(this, arguments); + this.element.on("load", function () { + self.fireEvent("EVENT_LOADED"); + }); }, setSrc: function (src) { @@ -45,4 +48,4 @@ BI.Iframe = BI.inherit(BI.Single, { } }); -BI.shortcut("bi.iframe", BI.Iframe); \ No newline at end of file +BI.shortcut("bi.iframe", BI.Iframe);