2

它不起作用,有什么问题吗?

var win = new Ext.Window({
    title: 'PDF Content',
    width: 400,
    height: 600,
    maximizable: true,
    layout: 'fit',
    plain: true,

    items: { // Let's put an empty grid in just to illustrate fit layout
        xtype: 'component',
        autoEl: {
            tag: "iframe",
            src: "../../../resources/august2013.pdf"
        }
    }
    //items : [ {
    //    html: '<object width="100%" height="100%" data="../../../resources/august2013.pdf"></object>'
    //} ]
})
win.show();

我在下面插入代码后得到的这个视图Deamon

在此处输入图像描述

4

1 回答 1

6

尝试这个 :

var win = Ext.create('Ext.window.Window' {
    title: 'PDF Content',
    width: 400,
    height: 600,
    modal: true,
    closeAction: 'hide',
    items: [{
        xtype: 'component',
        html: '<iframe src="../../../resources/august2013.pdf" width="100%" height="100%"></iframe>',
    }]
});
win.show();
于 2013-08-22T11:54:40.233 回答