1

我无法使用 EXT JS 将图像数据加载到可拖动的窗口中。

流式传输图像文件的进程的链接在代码中。

我试过使用

var plotWin = Ext.create('Ext.Window', {
    title: 'Plot',
    width: 600,
    height: 400,
    x: 10,
    y: 200,
    loader : {
                url : "http://209.105.242.30/custom/webimg",
                autoLoad : true,
                renderer : 'data'
            },
    plain: true,
    headerPosition: 'top',
    layout: 'fit',
    items: {
        border: false
    }
});

进而

plotWin.show();

但这似乎不起作用。

4

1 回答 1

3

看起来该 url 是跨域的,这意味着它无法通过 ajax 加载。如果是图像,为什么不直接嵌入呢?

var plotWin = Ext.create('Ext.Window', {
    title: 'Plot',
    width: 600,
    height: 400,
    x: 10,
    y: 200,
    plain: true,
    headerPosition: 'top',
    layout: 'fit',
    items: {
        xtype: 'image',
        src: "http://209.105.242.30/custom/webimg"
    }
});
于 2012-06-25T23:10:55.173 回答