Extjs 4:创建 iFrame 窗口 [英] Extjs 4: Create an iFrame Window

查看:20
本文介绍了Extjs 4:创建 iFrame 窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在 Extjs 中创建一个 iFrame 窗口.以前在 ExtJS 3.x 中我会这样做:

I am in need of creating an iFrame Window in Extjs. Previously in ExtJS 3.x I would do this:

bodyCfg: {
    tag: 'iframe'
}

但是 ExtJS 4 的 Window 类似乎没有 bodyCfg.

But the Window Class of ExtJS 4 seems not to have a bodyCfg.

关于如何制作 iFrame ExtJS 4 窗口的任何想法?

Any ideas on how to make an iFrame ExtJS 4 Window?

推荐答案

我认为 autoEl 是您正在寻找的...

I think autoEl is what you are looking for...

我的一些建议,在 Ext 4.x 中不要使用 autoEl 作为 window 配置属性,它会使你的窗口格式错误.. 我建议你在 component(窗口的项目)中使用 autoEl

Some advice from me, in Ext 4.x don't use autoEl as a window config property, it can make your window malformed.. I suggest you to use autoEl in a component (items of your window)

new Ext.Window({
    title : "iframe",
    width : 300,
    height: 300,
    layout : 'fit',
    items : [{
        xtype : "component",
        autoEl : {
            tag : "iframe",
            src : "http://www.yahoo.com"
        }
    }]
}).show();

上面的代码比

new Ext.Window({
    title : "iframe",
    width : 300,
    height: 300,
    layout : 'fit',
    autoEl : {
       tag : "iframe",
       src : "http://www.yahoo.com"
    }
}).show();

注意:目前您无法在 iframe 中加载 Google 和 Facebook

Note: currenty you can't load Google and Facebook inside an iframe

这篇关于Extjs 4:创建 iFrame 窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆