Browse Source

无JIRA fix: 修复iframe attributes 问题

this.options = extend(this._defaultConfig(config), props, config);  options的生成是浅extend,如果外部也传了attributes 属性就被覆盖了
es6
zsmj1994 4 years ago
parent
commit
f87151a44e
  1. 11
      src/base/single/iframe/iframe.js

11
src/base/single/iframe/iframe.js

@ -12,18 +12,17 @@ BI.Iframe = BI.inherit(BI.Single, {
baseCls: (conf.baseCls || "") + " bi-iframe", baseCls: (conf.baseCls || "") + " bi-iframe",
src: "", src: "",
name: "", name: "",
attributes: { attributes: {},
frameborder: 0,
src: config.src,
name: config.name
},
width: "100%", width: "100%",
height: "100%" height: "100%"
}); });
}, },
_init: function () { _init: function () {
var self = this; 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); BI.Iframe.superclass._init.apply(this, arguments);
this.element.on("load", function () { this.element.on("load", function () {
self.fireEvent("EVENT_LOADED"); self.fireEvent("EVENT_LOADED");

Loading…
Cancel
Save